当前位置: 首页>>代码示例>>PHP>>正文


PHP nv_show_name_user函数代码示例

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


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

示例1: array

 }
 if (!empty($thead['chg_is_suspend'])) {
     $thead['chg_is_suspend'] = array(NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=suspend&admin_id=' . $row['admin_id'], $lang_module['chg_is_suspend2']);
 }
 if (!empty($thead['del'])) {
     $thead['del'] = array(NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=del&admin_id=' . $row['admin_id'], $lang_global['delete']);
 }
 if (empty($row['files_level'])) {
     $allow_files_type = array();
     $allow_modify_files = $allow_create_subdirectories = $allow_modify_subdirectories = 0;
 } else {
     list($allow_files_type, $allow_modify_files, $allow_create_subdirectories, $allow_modify_subdirectories) = explode('|', $row['files_level']);
     $allow_files_type = !empty($allow_files_type) ? explode(',', $allow_files_type) : array();
     $allow_files_type = array_values(array_intersect($global_config['file_allowed_ext'], $allow_files_type));
 }
 $row['full_name'] = nv_show_name_user($row['first_name'], $row['last_name'], $row['username']);
 $admins[$row['admin_id']] = array();
 $admins[$row['admin_id']]['caption'] = $row['admin_id'] == $admin_info['admin_id'] ? sprintf($lang_module['admin_info_title2'], $row['full_name']) : sprintf($lang_module['admin_info_title1'], $row['full_name']);
 $admins[$row['admin_id']]['link'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&id=' . $row['admin_id'];
 $admins[$row['admin_id']]['thead'] = $thead;
 $admins[$row['admin_id']]['options'] = array();
 $admins[$row['admin_id']]['options']['login'] = array($lang_module['login'], $login);
 $admins[$row['admin_id']]['options']['email'] = array($lang_module['email'], $email);
 $admins[$row['admin_id']]['options']['full_name'] = array($lang_module['name'], $row['full_name']);
 $admins[$row['admin_id']]['options']['lev'] = array($lang_module['lev'], $level_txt);
 $admins[$row['admin_id']]['options']['lev'] = array($lang_module['lev'], $level_txt);
 $admins[$row['admin_id']]['options']['position'] = array($lang_module['position'], $row['position']);
 $admins[$row['admin_id']]['options']['is_suspend'] = array($lang_module['is_suspend'], $is_suspend, $row['is_suspend']);
 if (defined('NV_IS_SPADMIN')) {
     $admins[$row['admin_id']]['options']['editor'] = array($lang_module['editor'], !empty($row['editor']) ? $row['editor'] : $lang_module['not_use']);
     $admins[$row['admin_id']]['options']['allow_files_type'] = array($lang_module['allow_files_type'], !empty($allow_files_type) ? implode(', ', $allow_files_type) : $lang_global['no']);
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:main.php

示例2: array

 $array_order = array('username' => NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op . '&orderby=username&sortby=' . $sortby, 'gender' => NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op . '&orderby=gender&sortby=' . $sortby, 'regdate' => NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op . '&orderby=regdate&sortby=' . $sortby);
 foreach ($array_order as $key => $link) {
     if ($orderby == $key) {
         $sortby_new = $sortby == 'DESC' ? 'ASC' : 'DESC';
         $array_order_new[$key] = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op . '&orderby=' . $key . '&sortby=' . $sortby_new;
     } else {
         $array_order_new[$key] = $link;
     }
 }
 $db->sqlreset()->select('COUNT(*)')->from(NV_USERS_GLOBALTABLE)->where('active=1');
 $num_items = $db->query($db->sql())->fetchColumn();
 $db->select('userid, username, md5username, first_name, last_name, photo, gender, regdate')->order($orderby . ' ' . $sortby)->limit($per_page)->offset(($page - 1) * $per_page);
 $result = $db->query($db->sql());
 $users_array = array();
 while ($item = $result->fetch()) {
     $item['full_name'] = nv_show_name_user($item['first_name'], $item['last_name']);
     if (!empty($item['photo']) and file_exists(NV_ROOTDIR . '/' . $item['photo'])) {
         $item['photo'] = NV_BASE_SITEURL . $item['photo'];
     } else {
         $item['photo'] = NV_BASE_SITEURL . 'themes/' . $module_info['template'] . '/images/' . $module_file . '/no_avatar.png';
     }
     $item['regdate'] = nv_date('d/m/Y', $item['regdate']);
     $item['link'] = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=memberlist/' . change_alias($item['username']) . '-' . $item['md5username'];
     $item['gender'] = $item['gender'] == 'M' ? $lang_module['male'] : ($item['gender'] == 'F' ? $lang_module['female'] : $lang_module['na']);
     $users_array[$item['userid']] = $item;
 }
 $result->closeCursor();
 // Khong cho dat trang tuy tien
 if (empty($users_array) and $page > 0) {
     Header('Location: ' . nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name, true));
     exit;
开发者ID:anhtunguyen,项目名称:vietnamguide,代码行数:31,代码来源:memberlist.php

示例3: IN

     $sql = "SELECT * FROM " . NV_USERS_GLOBALTABLE . " where userid IN (" . $module_info['admins'] . ")";
     if (!empty($orderby) and in_array($orderby, $orders)) {
         $orderby_sql = $orderby != 'full_name' ? $orderby : ($global_config['name_show'] == 0 ? "concat(first_name,' ',last_name)" : "concat(last_name,' ',first_name)");
         $sql .= " ORDER BY " . $orderby_sql . " " . $ordertype;
         $base_url .= "&sortby=" . $orderby . "&sorttype=" . $ordertype;
     }
     $result = $db->query($sql);
     while ($row = $result->fetch()) {
         $userid_i = (int) $row['userid'];
         $admin_module = isset($array_cat_admin[$userid_i][0]) ? intval($array_cat_admin[$userid_i][0]['admin']) : 0;
         $admin_module_cat = $array_permissions_mod[$admin_module];
         $is_edit = true;
         if ($admin_module == 2 and !defined('NV_IS_SPADMIN')) {
             $is_edit = false;
         }
         $users_list[$row['userid']] = array('userid' => $userid_i, 'username' => (string) $row['username'], 'full_name' => nv_show_name_user($row['first_name'], $row['last_name'], $row['username']), 'email' => (string) $row['email'], 'admin_module_cat' => $admin_module_cat, 'is_edit' => $is_edit);
     }
 }
 if (!empty($users_list)) {
     $head_tds = array();
     $head_tds['userid']['title'] = $lang_module['admin_userid'];
     $head_tds['userid']['href'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op . "&sortby=userid&sorttype=ASC";
     $head_tds['username']['title'] = $lang_module['admin_username'];
     $head_tds['username']['href'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op . "&sortby=username&sorttype=ASC";
     $head_tds['full_name']['title'] = $global_config['name_show'] == 0 ? $lang_module['lastname_firstname'] : $lang_module['firstname_lastname'];
     $head_tds['full_name']['href'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op . "&sortby=full_name&sorttype=ASC";
     $head_tds['email']['title'] = $lang_module['admin_email'];
     $head_tds['email']['href'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op . "&sortby=email&sorttype=ASC";
     foreach ($orders as $order) {
         if ($orderby == $order and $ordertype == 'ASC') {
             $head_tds[$order]['href'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op . "&sortby=" . $order . "&sorttype=DESC";
开发者ID:webvangvn,项目名称:nv4_module_videos,代码行数:31,代码来源:admins.php

示例4: nv_comment_module_data_reply

function nv_comment_module_data_reply($module, $comment_array, $is_delete)
{
    global $global_config, $module_file, $module_config, $lang_module_comment;
    $template = file_exists(NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/comment/comment.tpl') ? $global_config['module_theme'] : 'default';
    $xtpl = new XTemplate('comment.tpl', NV_ROOTDIR . '/themes/' . $template . '/modules/comment');
    $xtpl->assign('TEMPLATE', $template);
    $xtpl->assign('LANG', $lang_module_comment);
    foreach ($comment_array as $comment_array_i) {
        if (!empty($comment_array_i['subcomment'])) {
            $comment_array_reply = nv_comment_module_data_reply($module, $comment_array_i['subcomment'], $is_delete);
            $xtpl->assign('CHILDREN', $comment_array_reply);
            $xtpl->parse('children.detail.children');
        }
        $comment_array_i['post_time'] = nv_date('d/m/Y H:i', $comment_array_i['post_time']);
        if (!empty($comment_array_i['photo']) && file_exists(NV_ROOTDIR . '/' . $comment_array_i['photo'])) {
            $comment_array_i['photo'] = NV_BASE_SITEURL . $comment_array_i['photo'];
        } else {
            $comment_array_i['photo'] = NV_BASE_SITEURL . 'themes/' . $global_config['module_theme'] . '/images/users/no_avatar.png';
        }
        if (!empty($comment_array_i['userid'])) {
            $comment_array_i['post_name'] = nv_show_name_user($comment_array_i['first_name'], $comment_array_i['last_name']);
        }
        $xtpl->assign('COMMENT', $comment_array_i);
        if ($module_config[$module]['emailcomm'] and !empty($comment_array_i['post_email'])) {
            $xtpl->parse('children.detail.emailcomm');
        }
        if ($is_delete) {
            $xtpl->parse('children.detail.delete');
        }
        $xtpl->parse('children.detail');
    }
    $xtpl->parse('children');
    return $xtpl->text('children');
}
开发者ID:anhtunguyen,项目名称:vietnamguide,代码行数:34,代码来源:comment.php

示例5: array

}
$num_items = $db->query($db->sql())->fetchColumn();
$db->select('*')->limit($per_page)->offset(($page - 1) * $per_page);
if (!empty($orderby) and in_array($orderby, $orders)) {
    $orderby_sql = $orderby != 'full_name' ? $orderby : ($global_config['name_show'] == 0 ? "concat(first_name,' ',last_name)" : "concat(last_name,' ',first_name)");
    $db->order($orderby_sql . ' ' . $ordertype);
    $base_url .= '&sortby=' . $orderby . '&sorttype=' . $ordertype;
}
$result2 = $db->query($db->sql());
$users_list = array();
$admin_in = array();
$is_edit = in_array('edit', $allow_func) ? true : false;
$is_delete = in_array('del', $allow_func) ? true : false;
$is_setactive = in_array('setactive', $allow_func) ? true : false;
while ($row = $result2->fetch()) {
    $users_list[$row['userid']] = array('userid' => $row['userid'], 'username' => $row['username'], 'full_name' => nv_show_name_user($row['first_name'], $row['last_name'], $row['username']), 'email' => $row['email'], 'regdate' => date('d/m/Y H:i', $row['regdate']), 'checked' => $row['active'] ? ' checked="checked"' : '', 'disabled' => $is_setactive ? ' onclick="nv_chang_status(' . $row['userid'] . ');"' : ' disabled="disabled"', 'is_edit' => $is_edit, 'is_delete' => $is_delete, 'level' => $lang_module['level0'], 'is_admin' => false);
    if ($global_config['idsite'] > 0 and $row['idsite'] != $global_config['idsite']) {
        $users_list[$row['userid']]['is_edit'] = false;
        $users_list[$row['userid']]['is_delete'] = false;
    }
    $admin_in[] = $row['userid'];
}
if (!empty($admin_in)) {
    $admin_in = implode(',', $admin_in);
    $sql = 'SELECT admin_id, lev FROM ' . NV_AUTHORS_GLOBALTABLE . ' WHERE admin_id IN (' . $admin_in . ')';
    $query = $db->query($sql);
    while ($row = $query->fetch()) {
        $users_list[$row['admin_id']]['is_delete'] = false;
        if ($row['lev'] == 1) {
            $users_list[$row['admin_id']]['level'] = $lang_global['level1'];
            $users_list[$row['admin_id']]['img'] = 'admin1';
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:main.php

示例6: nv_unhtmlspecialchars

}
$time_set = $nv_Request->get_int($module_data . '_' . $op . '_' . $_id, 'session');
if (empty($time_set)) {
    $nv_Request->set_Session($module_data . '_' . $op . '_' . $_id, NV_CURRENTTIME);
    $query = 'UPDATE ' . NV_PREFIXLANG . '_' . $module_data . ' SET viewcount=viewcount+1 WHERE id=' . $_id;
    $db->query($query);
}
$array_data['code_html_unhtml'] = nv_unhtmlspecialchars($array_data['code_html']);
$array_data['code_css_unhtml'] = nv_unhtmlspecialchars($array_data['code_css']);
$array_data['code_js_unhtml'] = nv_unhtmlspecialchars($array_data['code_js']);
$array_data['code_php_unhtml'] = nv_unhtmlspecialchars($array_data['code_php']);
$array_data['code_php_template_unhtml'] = nv_unhtmlspecialchars($array_data['code_php_template']);
// Nguoi dang
$sql = 'SELECT username, last_name, first_name FROM ' . NV_USERS_GLOBALTABLE . ' WHERE userid=' . $array_data['adduser'];
list($username, $last_name, $first_name) = $db->query($sql)->fetch(3);
$array_data['adduser'] = nv_show_name_user($first_name, $last_name, $username);
if (!defined('FACEBOOK_JSSDK')) {
    $lang = NV_LANG_DATA == 'vi' ? 'vi_VN' : 'en_US';
    $facebookappid = '835372636499958';
    $contents .= "<div id=\"fb-root\"></div>\n\t<script type=\"text/javascript\" data-show=\"after\">\n\t (function(d, s, id) {\n\t var js, fjs = d.getElementsByTagName(s)[0];\n\t if (d.getElementById(id)) return;\n\t js = d.createElement(s); js.id = id;\n\t js.src = \"//connect.facebook.net/" . $lang . "/all.js#xfbml=1&appId=" . $facebookappid . "\";\n\t fjs.parentNode.insertBefore(js, fjs);\n\t }(document, 'script', 'facebook-jssdk'));\n\t</script>";
    define('FACEBOOK_JSSDK', true);
}
if (!defined('GOOGLE_PLUS')) {
    $contents .= "<script type=\"text/javascript\" data-show=\"after\">\n\twindow.___gcfg = {lang: nv_lang_data};\n\t(function() {\n\tvar po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;\n\tpo.src = 'https://apis.google.com/js/plusone.js';\n\tvar s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);\n\t})();\n\t</script>";
    define('GOOGLE_PLUS', true);
}
/*
 * $header = '';
 * if( $array_data['catid'] > 0 )
 * {
 * $header .= '<h1>' . $array_data['title'] . '</h1>';
开发者ID:hongoctrien,项目名称:module-code,代码行数:31,代码来源:heading.php

示例7: nv_review_content

/**
 * nv_review_content
 *
 * @param mixed $data_content
 * @return
 */
function nv_review_content($data_content)
{
    global $module_info, $lang_module, $lang_global, $module_name, $module_data, $module_file, $pro_config, $op, $user_info;
    $xtpl = new XTemplate('review_content.tpl', NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $module_file);
    $xtpl->assign('LANG', $lang_module);
    $xtpl->assign('LINK_REVIEW', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=review&id=' . $data_content['id'] . '&1');
    if (!empty($user_info)) {
        $user_info['full_name'] = nv_show_name_user($user_info['first_name'], $user_info['last_name'], $user_info['username']);
        $xtpl->assign('SENDER', !empty($user_info['full_name']) ? $user_info['full_name'] : $user_info['username']);
    }
    $xtpl->assign('RATE_TOTAL', $data_content['rating_total']);
    $xtpl->assign('RATE_VALUE', $data_content['rating_point']);
    if ($pro_config['review_captcha']) {
        $xtpl->parse('main.captcha');
    }
    $xtpl->parse('main');
    return $xtpl->text('main');
}
开发者ID:nukeplus,项目名称:shops,代码行数:24,代码来源:theme.php

示例8: while

$part_row_title = '<a href="' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=row&amp;id=' . $row['cid'] . '">' . $part_row_title . '</a>';
$row['part_row_title'] = $part_row_title;
$row['url_back'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name;
$xtpl->assign('DATA', $row);
if (!empty($row['sender_phone'])) {
    $xtpl->parse('main.sender_phone');
}
if (isset($contact_allowed['reply'][$row['cid']])) {
    $xtpl->assign('URL_REPLY', NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=reply&amp;id=' . $row['id']);
    $xtpl->parse('main.reply');
}
if ($row['is_reply']) {
    $result = $db->query('SELECT * FROM ' . NV_PREFIXLANG . '_' . $module_data . '_reply WHERE id=' . $id);
    while ($row = $result->fetch()) {
        $sql = 'SELECT t2.username as admin_login, t2.email as admin_email, t2.first_name, t2.last_name FROM ' . NV_AUTHORS_GLOBALTABLE . ' t1 INNER JOIN ' . NV_USERS_GLOBALTABLE . ' t2 ON t1.admin_id = t2.userid WHERE t1.admin_id=' . intval($row['reply_aid']);
        $adm_row = $db->query($sql)->fetch();
        $reply_name = nv_show_name_user($adm_row['first_name'], $adm_row['last_name'], $adm_row['admin_login']);
        $reply_name = '<a href="' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=authors&amp;id=' . intval($row['reply_aid']) . '">' . $reply_name . '</a>';
        $adm_row['reply_name'] = $reply_name;
        $adm_row['reply_time'] = nv_date('H:i d/m/Y', $row['reply_time']);
        $adm_row['sender_name'] = $sender_name;
        $adm_row['reply_content'] = $row['reply_content'];
        $xtpl->assign('REPLY', $adm_row);
        $xtpl->parse('main.data_reply');
    }
}
$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:nukeplus,项目名称:nuke,代码行数:31,代码来源:view.php

示例9: nv_show_name_user

						last_openid AS current_openid, password, question, answer, safemode 
						FROM ' . NV_USERS_GLOBALTABLE . ' WHERE userid = ' . $user['userid'] . ' AND active=1';
                    $user_info = $db->query($_sql)->fetch();
                    if (!empty($user_info)) {
                        if (empty($global_config['allowuserloginmulti'])) {
                            if (strcasecmp($user['checknum'], $user_info['checknum']) == 0 and isset($user['current_agent']) and strcasecmp($user['current_agent'], $user_info['current_agent']) == 0 and isset($user['current_ip']) and strcasecmp($user['current_ip'], $user_info['current_ip']) == 0 and isset($user['current_login']) and strcasecmp($user['current_login'], intval($user_info['current_login'])) == 0) {
                                //current login
                                $checknum = true;
                            } else {
                                $checknum = false;
                            }
                        } else {
                            $checknum = true;
                        }
                        if ($checknum) {
                            $user_info['full_name'] = nv_show_name_user($user_info['first_name'], $user_info['last_name'], $user_info['username']);
                            $user_info['in_groups'] = nv_user_groups($user_info['in_groups']);
                            $user_info['last_login'] = intval($user['last_login']);
                            $user_info['last_agent'] = $user['last_agent'];
                            $user_info['last_ip'] = $user['last_ip'];
                            $user_info['last_openid'] = $user['last_openid'];
                            $user_info['st_login'] = !empty($user_info['password']) ? true : false;
                            $user_info['valid_question'] = (!empty($user_info['question']) and !empty($user_info['answer'])) ? true : false;
                            $user_info['current_mode'] = isset($user['current_mode']) ? $user['current_mode'] : 0;
                            unset($user_info['checknum'], $user_info['password'], $user_info['question'], $user_info['answer']);
                            if (!empty($user_info['current_openid'])) {
                                $sth = $db->prepare('SELECT openid, email FROM ' . NV_USERS_GLOBALTABLE . '_openid WHERE opid= :current_openid');
                                $sth->bindParam(':current_openid', $user_info['current_openid'], PDO::PARAM_STR);
                                $sth->execute();
                                $row = $sth->fetch();
                                if (empty($row)) {
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:is_user.php

示例10: unset

     $topic->closeCursor();
     unset($topic, $rows);
 }
 if ($news_contents['allowed_rating']) {
     $time_set_rating = $nv_Request->get_int($module_name . '_' . $op . '_' . $news_contents['id'], 'cookie', 0);
     if ($time_set_rating > 0) {
         $news_contents['disablerating'] = 1;
     } else {
         $news_contents['disablerating'] = 0;
     }
     $news_contents['stringrating'] = sprintf($lang_module['stringrating'], $news_contents['total_rating'], $news_contents['click_rating']);
     $news_contents['numberrating'] = $news_contents['click_rating'] > 0 ? round($news_contents['total_rating'] / $news_contents['click_rating'], 1) : 0;
     $news_contents['langstar'] = array('note' => $lang_module['star_note'], 'verypoor' => $lang_module['star_verypoor'], 'poor' => $lang_module['star_poor'], 'ok' => $lang_module['star_ok'], 'good' => $lang_module['star_good}'], 'verygood' => $lang_module['star_verygood']);
 }
 list($post_username, $post_first_name, $post_last_name) = $db->query('SELECT username, first_name, last_name FROM ' . NV_USERS_GLOBALTABLE . ' WHERE userid = ' . $news_contents['admin_id'])->fetch(3);
 $news_contents['post_name'] = nv_show_name_user($post_first_name, $post_last_name, $post_username);
 $array_keyword = array();
 $key_words = array();
 $_query = $db->query('SELECT a1.keyword, a2.alias FROM ' . NV_PREFIXLANG . '_' . $module_data . '_tags_id a1 INNER JOIN ' . NV_PREFIXLANG . '_' . $module_data . '_tags a2 ON a1.tid=a2.tid WHERE a1.id=' . $news_contents['id']);
 while ($row = $_query->fetch()) {
     $array_keyword[] = $row;
     $key_words[] = $row['keyword'];
 }
 // comment
 if (isset($site_mods['comment']) and isset($module_config[$module_name]['activecomm'])) {
     define('NV_COMM_ID', $id);
     //ID bài viết hoặc
     define('NV_COMM_AREA', $module_info['funcs'][$op]['func_id']);
     //để đáp ứng comment ở bất cứ đâu không cứ là bài viết
     //check allow comemnt
     $allowed = $module_config[$module_name]['allowed_comm'];
开发者ID:volong1012,项目名称:nukeviet,代码行数:31,代码来源:detail.php

示例11: sprintf

     }
 }
 if ($mod == 'settings') {
     if ($data['type'] == 'auto_deactive_cronjobs') {
         $cron_title = $db->query('SELECT ' . NV_LANG_DATA . '_cron_name FROM ' . $db_config['dbsystem'] . '.' . NV_CRONJOBS_GLOBALTABLE . ' WHERE id=' . $data['content']['cron_id'])->fetchColumn();
         $data['title'] = sprintf($lang_module['notification_cronjobs_auto_deactive'], $cron_title);
         $data['link'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $data['module'] . '&amp;' . NV_OP_VARIABLE . '=cronjobs';
     }
 }
 // Hien thi tu cac module
 if (file_exists(NV_ROOTDIR . '/modules/' . $site_mods[$mod]['module_file'] . '/notification.php')) {
     // Hien thi thong bao tu cac module site
     if ($data['send_from'] > 0) {
         $user_info = $db->query('SELECT username, first_name, last_name, photo FROM ' . NV_USERS_GLOBALTABLE . ' WHERE userid = ' . $data['send_from'])->fetch();
         if ($user_info) {
             $data['send_from'] = nv_show_name_user($user_info['first_name'], $user_info['last_name'], $user_info['username']);
         } else {
             $data['send_from'] = $lang_global['level5'];
         }
         if (!empty($user_info['photo']) and file_exists(NV_ROOTDIR . '/' . $user_info['photo'])) {
             $data['photo'] = NV_BASE_SITEURL . $admin_info['photo'];
         } else {
             $data['photo'] = NV_BASE_SITEURL . 'themes/default/images/users/no_avatar.png';
         }
     } else {
         $data['photo'] = NV_BASE_SITEURL . 'themes/default/images/users/no_avatar.png';
         $data['send_from'] = $lang_global['level5'];
     }
     include NV_ROOTDIR . '/modules/' . $site_mods[$mod]['module_file'] . '/notification.php';
 }
 if (!empty($data['title'])) {
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:notification_load.php

示例12: array

    $table_caption = $lang_module['search_page_title'];
    $db->where($methods[$method]['sql'] . " LIKE '%" . $db->dblikeescape($methodvalue) . "%'");
}
$page = $nv_Request->get_int('page', 'get', 1);
$per_page = 30;
$num_items = $db->query($db->sql())->fetchColumn();
$db->select('*')->limit($per_page)->offset(($page - 1) * $per_page);
if (!empty($orderby) and in_array($orderby, $orders)) {
    $orderby_sql = $orderby != 'full_name' ? $orderby : ($global_config['name_show'] == 0 ? "concat(first_name,' ',last_name)" : "concat(last_name,' ',first_name)");
    $db->order($orderby_sql . ' ' . $ordertype);
    $base_url .= '&amp;sortby=' . $orderby . '&amp;sorttype=' . $ordertype;
}
$result = $db->query($db->sql());
$users_list = array();
while ($row = $result->fetch()) {
    $users_list[$row['userid']] = array('userid' => $row['userid'], 'username' => $row['username'], 'full_name' => nv_show_name_user($row['first_name'], $row['last_name'], $row['username']), 'email' => $row['email'], 'regdate' => date('d/m/Y H:i', $row['regdate']));
}
$generate_page = nv_generate_page($base_url, $num_items, $per_page, $page);
$head_tds = array();
$head_tds['userid']['title'] = $lang_module['userid'];
$head_tds['userid']['href'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=user_waiting&amp;sortby=userid&amp;sorttype=ASC';
$head_tds['username']['title'] = $lang_module['account'];
$head_tds['username']['href'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=user_waiting&amp;sortby=username&amp;sorttype=ASC';
$head_tds['full_name']['title'] = $lang_module['name'];
$head_tds['full_name']['href'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=user_waiting&amp;sortby=full_name&amp;sorttype=ASC';
$head_tds['email']['title'] = $lang_module['email'];
$head_tds['email']['href'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=user_waiting&amp;sortby=email&amp;sorttype=ASC';
$head_tds['regdate']['title'] = $lang_module['register_date'];
$head_tds['regdate']['href'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=user_waiting&amp;sortby=regdate&amp;sorttype=ASC';
foreach ($orders as $order) {
    if ($orderby == $order and $ordertype == 'ASC') {
开发者ID:nukeviet,项目名称:nukeviet,代码行数:31,代码来源:user_waiting.php

示例13: nv_memberslist_detail_theme

/**
 * nv_memberslist_detail_theme()
 *
 * @param mixed $item
 * @param mixed $array_field_config
 * @param mixed $custom_fields
 * @return
 */
function nv_memberslist_detail_theme($item, $array_field_config, $custom_fields)
{
    global $module_info, $module_file, $lang_module, $module_name, $global_config, $op;
    $xtpl = new XTemplate('viewdetailusers.tpl', NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $module_file);
    $xtpl->assign('LANG', $lang_module);
    $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);
    $item['full_name'] = nv_show_name_user($item['first_name'], $item['last_name']);
    if (!empty($item['photo']) and file_exists(NV_ROOTDIR . '/' . $item['photo'])) {
        $xtpl->assign('SRC_IMG', NV_BASE_SITEURL . $item['photo']);
    } else {
        $xtpl->assign('SRC_IMG', NV_BASE_SITEURL . 'themes/' . $module_info['template'] . '/images/' . $module_file . '/no_avatar.png');
    }
    $item['gender'] = $item['gender'] == 'M' ? $lang_module['male'] : ($item['gender'] == 'F' ? $lang_module['female'] : $lang_module['na']);
    $item['birthday'] = empty($item['birthday']) ? $lang_module['na'] : nv_date('d/m/Y', $item['birthday']);
    $item['regdate'] = nv_date('d/m/Y', $item['regdate']);
    $item['last_login'] = empty($item['last_login']) ? '' : nv_date('l, d/m/Y H:i', $item['last_login']);
    $xtpl->assign('USER', $item);
    if (!empty($item['view_mail'])) {
        $xtpl->parse('main.viewemail');
    }
    // Parse custom fields
    if (!empty($array_field_config)) {
        //var_dump($array_field_config); die();
        foreach ($array_field_config as $row) {
            if ($row['show_profile']) {
                $question_type = $row['field_type'];
                if ($question_type == 'checkbox') {
                    $result = explode(',', $custom_fields[$row['field']]);
                    $value = '';
                    foreach ($result as $item) {
                        $value .= $row['field_choices'][$item] . '<br />';
                    }
                } elseif ($question_type == 'multiselect' or $question_type == 'select' or $question_type == 'radio') {
                    $value = $row['field_choices'][$custom_fields[$row['field']]];
                } else {
                    $value = $custom_fields[$row['field']];
                }
                $xtpl->assign('FIELD', array('title' => $row['title'], 'value' => $value));
                $xtpl->parse('main.field.loop');
            }
        }
        $xtpl->parse('main.field');
    }
    $_lis = $module_info['funcs'];
    $_alias = $module_info['alias'];
    foreach ($_lis as $_li) {
        if ($_li['show_func']) {
            if ($_li['func_name'] == $op or $_li['func_name'] == 'avatar' or $_li['func_name'] == 'groups') {
                continue;
            }
            if ($_li['func_name'] == 'register' and !$global_config['allowuserreg']) {
                continue;
            }
            $href = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $_alias[$_li['func_name']];
            $li = array('href' => $href, 'title' => $_li['func_name'] == 'main' ? $lang_module['user_info'] : $_li['func_custom_name']);
            $xtpl->assign('NAVBAR', $li);
            $xtpl->parse('main.navbar');
        }
    }
    $xtpl->parse('main');
    return $xtpl->text('main');
}
开发者ID:hongoctrien,项目名称:nukeviet,代码行数:71,代码来源:theme.php

示例14: define

        }
    }
    if (!empty($admin_info['allow_modify_subdirectories'])) {
        if (!defined('NV_ALLOW_MODIFY_SUBDIRECTORIES')) {
            define('NV_ALLOW_MODIFY_SUBDIRECTORIES', true);
        }
    }
    $admin_online = explode('|', $admin_online);
    $admin_info['checkpass'] = intval($admin_online[0]);
    $admin_info['last_online'] = intval($admin_online[2]);
    $admin_info['checkhits'] = intval($admin_online[3]);
    if ($admin_info['checkpass']) {
        if (NV_CURRENTTIME - $admin_info['last_online'] > $global_config['admin_check_pass_time']) {
            $admin_info['checkpass'] = 0;
        }
    }
    $nv_Request->set_Session('online', $admin_info['checkpass'] . '|' . $admin_info['last_online'] . '|' . NV_CURRENTTIME . '|' . $admin_info['checkhits']);
    if (empty($admin_info['checkpass'])) {
        if (!$nv_Request->isset_request(NV_ADMINRELOGIN_VARIABLE, 'get') or $nv_Request->get_int(NV_ADMINRELOGIN_VARIABLE, 'get') != 1) {
            // check selfurl cronjobs
            if ($nv_Request->get_string('second', 'get') == 'cronjobs') {
                $client_info['selfurl'] = $nv_Request->my_current_domain . NV_BASE_ADMINURL;
            }
            $nv_Request->set_Session('admin_relogin_redirect', $client_info['selfurl']);
            Header('Location: ' . $global_config['site_url'] . '/index.php?' . NV_ADMINRELOGIN_VARIABLE . '=1');
            exit;
        }
    }
    $admin_info['full_name'] = nv_show_name_user($admin_info['first_name'], $admin_info['last_name']);
}
unset($admin_cookie, $admin_online);
开发者ID:volong1012,项目名称:nukeviet,代码行数:31,代码来源:is_admin.php

示例15: nv_aleditor

    $note = nv_aleditor('note', '100%', '150px', $note);
} else {
    $note = '<textarea style="width:100%;height:150px" name="note" id="note">' . $note . '</textarea>';
}
if (!empty($image) and is_file(NV_UPLOADS_REAL_DIR . '/' . $module_upload . '/' . $image)) {
    $image = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/' . $image;
}
$xtpl->assign('DATA', array('full_name' => $full_name, 'alias' => $alias, 'image' => $image, 'phone' => $phone, 'fax' => $fax, 'email' => $email, 'address' => $address, 'note' => $note));
if (!empty($others)) {
    foreach ($others as $var => $val) {
        $xtpl->assign('OTHER', array('var' => $var, 'val' => $val));
        $xtpl->parse('main.other');
    }
}
if (!empty($cats)) {
    foreach ($cats as $val) {
        $xtpl->assign('CATS', $val);
        $xtpl->parse('main.cats');
    }
}
// list danh sách bộ phận liên hệ
$a = 0;
foreach ($adms as $admid => $values) {
    $xtpl->assign('ADMIN', array('suspend' => $values['is_suspend'] ? 'class="warning" title="' . $lang_global['admin_suspend'] . '"' : '', 'username' => $values['username'], 'full_name' => nv_show_name_user($values['first_name'], $values['last_name'], $values['username']), 'email' => $values['email'], 'admid' => $admid, 'img' => 'admin' . $values['level'], 'level' => $lang_global['level' . $values['level']], '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';
开发者ID:nukeviet,项目名称:nukeviet,代码行数:31,代码来源:row.php


注:本文中的nv_show_name_user函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。