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

PHP nv_date函数代码示例

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

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



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

示例1: nv_theme_event_detail

/**
 * nv_theme_event_detail()
 *
 * @param mixed $array_data
 * @return
 */
function nv_theme_event_detail($array_data)
{
    global $global_config, $module_name, $module_file, $lang_module, $module_config, $module_info, $op, $global_array_event_cat;
    if (NV_CURRENTTIME >= $array_data['start_time'] and NV_CURRENTTIME <= $array_data['end_time']) {
        $array_data['status_str'] = $lang_module['status_2'];
    } elseif (NV_CURRENTTIME < $array_data['start_time']) {
        $array_data['status_str'] = $lang_module['status_1'];
    } else {
        $array_data['status_str'] = $lang_module['status_0'];
    }
    $array_data['start_date'] = nv_date('d/m/Y', $array_data['start_time']);
    $array_data['start_time'] = nv_date('H:i', $array_data['start_time']);
    $array_data['end_date'] = nv_date('d/m/Y', $array_data['end_time']);
    $array_data['end_time'] = nv_date('H:i', $array_data['end_time']);
    $array_data['title_cat'] = $global_array_event_cat[$array_data['catid']]['title'];
    $array_data['url_cat'] = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=' . $global_array_event_cat[$array_data['catid']]['alias'];
    $xtpl = new XTemplate($op . '.tpl', NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $module_file);
    $xtpl->assign('LANG', $lang_module);
    $xtpl->assign('DATA', $array_data);
    if ($array_data['start_date'] == $array_data['end_date']) {
        $xtpl->parse('main.day');
    } else {
        $xtpl->parse('main.longday');
    }
    $xtpl->parse('main');
    return $xtpl->text('main');
}
开发者ID:hoangvtien,项目名称:module-event,代码行数:33,代码来源:theme.php


示例2: nv_news_block_newscenter

 function nv_news_block_newscenter($block_config)
 {
     global $module_data, $module_name, $module_file, $global_array_cat, $global_config, $lang_module, $db, $module_config, $module_info;
     $module_name = 'news';
     $module_data = 'news';
     $xtpl = new XTemplate('block_newscenter.tpl', NV_ROOTDIR . '/themes/' . $module_info['template'] . '/blocks');
     $xtpl->assign('lang', $lang_module);
     $xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
     $db->sqlreset()->select('id, catid, publtime, title, alias, hometext, homeimgthumb, homeimgfile')->from(NV_PREFIXLANG . '_' . $module_data . '_rows')->where('status= 1')->order('publtime DESC')->limit(5);
     $list = nv_db_cache($db->sql(), 'id', $module_name);
     $i = 1;
     foreach ($list as $row) {
         $row['publtime'] = nv_date('m/d/Y', $row['publtime']);
         $row['link'] = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=' . $global_array_cat[$row['catid']]['alias'] . '/' . $row['alias'] . '-' . $row['id'] . $global_config['rewrite_exturl'];
         $row['title0'] = nv_clean60(strip_tags($row['title']), $i == 1 ? 50 : 30);
         $row['hometext'] = nv_clean60(strip_tags($row['hometext']), 260);
         $image = NV_UPLOADS_REAL_DIR . '/' . $module_name . '/' . $row['homeimgfile'];
         if ($row['homeimgfile'] != '' and file_exists($image)) {
             if ($i == 1) {
                 $width = 570;
                 $height = 490;
             } else {
                 $width = 270;
                 $height = 230;
             }
             $row['imgsource'] = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_name . '/' . $row['homeimgfile'];
             $imginfo = nv_is_image($image);
             $basename = basename($image);
             if ($imginfo['width'] > $width or $imginfo['height'] > $height) {
                 $basename = preg_replace('/(.*)(\\.[a-zA-Z]+)$/', $module_name . '_' . $row['id'] . '_\\1_' . $width . '-' . $height . '\\2', $basename);
                 if (file_exists(NV_ROOTDIR . '/' . NV_TEMP_DIR . '/' . $basename)) {
                     $row['imgsource'] = NV_BASE_SITEURL . NV_TEMP_DIR . '/' . $basename;
                 } else {
                     require_once NV_ROOTDIR . '/includes/class/image.class.php';
                     $_image = new image($image, NV_MAX_WIDTH, NV_MAX_HEIGHT);
                     $_image->cropFromCenter($width, $height);
                     $_image->save(NV_ROOTDIR . '/' . NV_TEMP_DIR, $basename);
                     if (file_exists(NV_ROOTDIR . '/' . NV_TEMP_DIR . '/' . $basename)) {
                         $row['imgsource'] = NV_BASE_SITEURL . NV_TEMP_DIR . '/' . $basename;
                     }
                 }
             }
         } elseif (nv_is_url($row['homeimgfile'])) {
             $row['imgsource'] = $row['homeimgfile'];
         } elseif (!empty($module_config[$module_name]['show_no_image'])) {
             $row['imgsource'] = NV_BASE_SITEURL . $module_config[$module_name]['show_no_image'];
         } else {
             $row['imgsource'] = NV_BASE_SITEURL . 'themes/' . $global_config['site_theme'] . '/images/no-image.png';
         }
         $xtpl->assign('main' . $i, $row);
         ++$i;
     }
     $xtpl->parse('main');
     return $xtpl->text('main');
 }
开发者ID:hongoctrien,项目名称:themes-newszine,代码行数:55,代码来源:global.block_newscenter.php


示例3: nv_others_product

 /**
  * nv_others_product()
  *
  * @return
  */
 function nv_others_product($block_config)
 {
     global $op, $global_config, $pro_config;
     $module = $block_config['module'];
     if ($op == 'detail') {
         global $module_name, $lang_module, $module_info, $module_file, $global_array_shops_cat, $db, $module_data, $db_config, $id, $catid, $pro_config, $global_config;
         $xtpl = new XTemplate('block.others_product.tpl', NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $module_file);
         $xtpl->assign('LANG', $lang_module);
         $xtpl->assign('THEME_TEM', NV_BASE_SITEURL . 'themes/' . $module_info['template']);
         $xtpl->assign('WIDTH', $pro_config['blockwidth']);
         $db->sqlreset()->select('id, listcatid, ' . NV_LANG_DATA . '_title, ' . NV_LANG_DATA . '_alias ,addtime, homeimgfile, homeimgthumb, product_price, money_unit, discount_id, showprice')->from($db_config['prefix'] . '_' . $module_data . '_rows')->where('status =1 AND listcatid = ' . $catid . ' AND id < ' . $id)->order('id DESC')->limit(20);
         $result = $db->query($db->sql());
         $i = 1;
         while (list($id_i, $listcatid_i, $title_i, $alias_i, $addtime_i, $homeimgfile_i, $homeimgthumb_i, $product_price_i, $money_unit_i, $discount_id_i, $showprice_i) = $result->fetch(3)) {
             if ($homeimgthumb_i == 1) {
                 $src_img = NV_BASE_SITEURL . NV_FILES_DIR . '/' . $site_mods[$module]['module_upload'] . '/' . $homeimgfile_i;
             } elseif ($homeimgthumb_i == 2) {
                 $src_img = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $site_mods[$module]['module_upload'] . '/' . $homeimgfile_i;
             } elseif ($homeimgthumb_i == 3) {
                 $src_img = $homeimgfile_i;
             } else {
                 $src_img = NV_BASE_SITEURL . 'themes/' . $global_config['site_theme'] . '/images/shops/no-image.jpg';
             }
             $xtpl->assign('link', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=' . $global_array_shops_cat[$listcatid_i]['alias'] . '/' . $alias_i . $global_config['rewrite_exturl']);
             $xtpl->assign('title', $title_i);
             $xtpl->assign('src_img', $src_img);
             $xtpl->assign('time', nv_date('d-m-Y h:i:s A', $addtime_i));
             if ($pro_config['active_price'] == '1') {
                 if ($showprice_i == '1') {
                     $price = nv_get_price($id_i, $money_unit_i);
                     $xtpl->assign('PRICE', $price);
                     if ($discount_id_i and $price['discount_percent'] > 0) {
                         $xtpl->parse('main.loop.price.discounts');
                     } else {
                         $xtpl->parse('main.loop.price.no_discounts');
                     }
                     $xtpl->parse('main.loop.price');
                 } else {
                     $xtpl->parse('main.loop.contact');
                 }
             }
             $bg = $i % 2 == 0 ? 'bg' : '';
             $xtpl->assign('bg', $bg);
             $xtpl->parse('main.loop');
             ++$i;
         }
         $xtpl->parse('main');
         return $xtpl->text('main');
     }
 }
开发者ID:hoangvtien,项目名称:module-shops,代码行数:55,代码来源:module.block_others_product.php


示例4: nv_bdown_news

 function nv_bdown_news($block_config)
 {
     global $db, $module_info, $site_mods;
     $module = $block_config['module'];
     $file = $site_mods[$module]['module_file'];
     // Lay thong tin phan quyen
     $sql = "SELECT `id`, `alias`, `who_view`, `groups_view` FROM `" . NV_PREFIXLANG . "_" . $site_mods[$module]['module_data'] . "_categories` WHERE `status`=1";
     $_tmp = nv_db_cache($sql, 'id', $module);
     $list_cat = array();
     if ($_tmp) {
         foreach ($_tmp as $row) {
             if (nv_set_allow($row['who_view'], $row['groups_view'])) {
                 $list_cat[$row['id']] = $row['alias'];
             }
         }
     }
     unset($_tmp, $sql);
     if ($list_cat) {
         $sql = "SELECT `id`, `catid`, `title`, `alias`, `updatetime` FROM `" . NV_PREFIXLANG . "_" . $site_mods[$module]['module_data'] . "` WHERE `status` AND `catid` IN(" . implode(",", array_keys($list_cat)) . ") ORDER BY `updatetime` DESC LIMIT 0 , " . $block_config['numrow'];
         $list = nv_db_cache($sql, 'id', $module);
         if (!empty($list)) {
             if (file_exists(NV_ROOTDIR . "/themes/" . $module_info['template'] . "/modules/" . $file . "/block_new_files.tpl")) {
                 $block_theme = $module_info['template'];
             } else {
                 $block_theme = "default";
             }
             $xtpl = new XTemplate("block_new_files.tpl", NV_ROOTDIR . "/themes/" . $block_theme . "/modules/" . $file);
             $xtpl->assign('CONFIG', $block_config);
             foreach ($list as $row) {
                 $row['link'] = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=" . $module . "&amp;" . NV_OP_VARIABLE . "=" . $list_cat[$row['catid']] . "/" . $row['alias'];
                 $row['updatetime'] = nv_date("d/m/Y", $row['updatetime']);
                 $row['stitle'] = nv_clean60($row['title'], $block_config['title_length']);
                 $xtpl->assign('ROW', $row);
                 if ($block_config['img_bullet']) {
                     $xtpl->parse('main.loop.bullet');
                 }
                 $xtpl->parse('main.loop');
             }
             $xtpl->parse('main');
             return $xtpl->text('main');
         }
     }
 }
开发者ID:atarubi,项目名称:nuke-viet,代码行数:43,代码来源:global.new_files.php


示例5: nv_bdown_news

 function nv_bdown_news($block_config)
 {
     global $db, $module_info, $site_mods, $global_config, $nv_Cache;
     $module = $block_config['module'];
     $file = $site_mods[$module]['module_file'];
     // Lay thong tin phan quyen
     $sql = 'SELECT id, alias, groups_view FROM ' . NV_PREFIXLANG . '_' . $site_mods[$module]['module_data'] . '_categories WHERE status=1';
     $_tmp = $nv_Cache->db($sql, 'id', $module);
     $list_cat = array();
     if ($_tmp) {
         foreach ($_tmp as $row) {
             if (nv_user_in_groups($row['groups_view'])) {
                 $list_cat[$row['id']] = $row['alias'];
             }
         }
     }
     unset($_tmp, $sql);
     if ($list_cat) {
         $db->sqlreset()->select('id, catid, title, alias, updatetime')->from(NV_PREFIXLANG . '_' . $site_mods[$module]['module_data'])->where('status AND catid IN (' . implode(',', array_keys($list_cat)) . ')')->order('updatetime DESC')->limit($block_config['numrow']);
         $list = $nv_Cache->db($db->sql(), 'id', $module);
         if (!empty($list)) {
             if (file_exists(NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $file . '/block_new_files.tpl')) {
                 $block_theme = $global_config['module_theme'];
             } else {
                 $block_theme = 'default';
             }
             $xtpl = new XTemplate('block_new_files.tpl', NV_ROOTDIR . '/themes/' . $block_theme . '/modules/' . $file);
             $xtpl->assign('CONFIG', $block_config);
             foreach ($list as $row) {
                 $row['link'] = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module . '&amp;' . NV_OP_VARIABLE . '=' . $list_cat[$row['catid']] . '/' . $row['alias'] . $global_config['rewrite_exturl'];
                 $row['updatetime'] = nv_date('d/m/Y', $row['updatetime']);
                 $row['stitle'] = nv_clean60($row['title'], $block_config['title_length']);
                 $xtpl->assign('ROW', $row);
                 if ($block_config['img_bullet']) {
                     $xtpl->parse('main.loop.bullet');
                 }
                 $xtpl->parse('main.loop');
             }
             $xtpl->parse('main');
             return $xtpl->text('main');
         }
     }
 }
开发者ID:NukeVlad,项目名称:module-download,代码行数:43,代码来源:global.new_files.php


示例6: lost_pass_sendMail

/**
 * lost_pass_sendMail()
 *
 * @param mixed $row
 * @return void
 */
function lost_pass_sendMail($row)
{
    global $db, $global_config, $lang_module;
    $passlostkey = (!empty($row['passlostkey']) and preg_match("/^([0-9]{10,15})\\|([a-z0-9]{32})\$/i", $row['passlostkey'], $matches)) ? array($matches[1], $matches[2]) : array();
    if (!isset($passlostkey[0]) or !isset($passlostkey[1]) or (int) $passlostkey[0] < NV_CURRENTTIME) {
        $key = strtoupper(nv_genpass(10));
        $passlostkey = md5($row['userid'] . $key . $global_config['sitekey']);
        $pa = NV_CURRENTTIME + 3600;
        $passlostkey = $pa . '|' . $passlostkey;
        $sql = "UPDATE " . NV_MOD_TABLE . " SET passlostkey='" . $passlostkey . "' WHERE userid=" . $row['userid'];
        $db->query($sql);
        $name = $global_config['name_show'] ? array($row['first_name'], $row['last_name']) : array($row['last_name'], $row['first_name']);
        $name = array_filter($name);
        $name = implode(' ', $name);
        $sitename = '<a href="' . NV_MY_DOMAIN . NV_BASE_SITEURL . '">' . $global_config['site_name'] . '</a>';
        $message = sprintf($lang_module['lostpass_email_content'], $name, $sitename, $key, nv_date('H:i d/m/Y', $pa));
        @nv_sendmail($global_config['site_email'], $row['email'], $lang_module['lostpass_email_subject'], $message);
    }
}
开发者ID:nukeviet,项目名称:nukeviet,代码行数:25,代码来源:lostpass.php


示例7: block_photo_detail

 function block_photo_detail($block_config)
 {
     global $data_album, $module_photo_cat, $lang_module, $op, $client_info, $site_mods, $module_info, $db, $module_config, $global_config, $my_head;
     if ($op == 'detail') {
         $module = $block_config['module'];
         $mod_data = $site_mods[$module]['module_data'];
         $mod_file = $site_mods[$module]['module_file'];
         if (file_exists(NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $mod_file . '/module.block_detail.tpl')) {
             $block_theme = $module_info['template'];
         } else {
             $block_theme = 'default';
         }
         $xtpl = new XTemplate('module.block_detail.tpl', NV_ROOTDIR . '/themes/' . $block_theme . '/modules/' . $mod_file . '/');
         $xtpl->assign('LANG', $lang_module);
         $xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
         $xtpl->assign('TEMPLATE', $module_info['template']);
         $xtpl->assign('MODULE_FILE', $mod_file);
         $xtpl->assign('SELFURL', $client_info['selfurl']);
         $data_album['image'] = NV_MY_DOMAIN . NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module . '/images/' . $data_album['file'];
         $data_album['thumb'] = NV_MY_DOMAIN . NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module . '/thumb/' . $data_album['thumb'];
         // $my_head="<meta name=\"thumbnail\" content=\"".$data_album['thumb']."\"/>";
         // $my_head.="<!--";
         // $my_head.="  <PageMap>";
         // $my_head.="	<DataObject type=\"thumbnail\">";
         // $my_head.="	  <Attribute name=\"src\" value=\"http://dangdinhtu.com/uploads/photo/thumb/2015_01/90x72-148-copy.jpg\"/>";
         // $my_head.="	  <Attribute name=\"width\" value=\"100\"/>";
         // $my_head.="	  <Attribute name=\"height\" value=\"130\"/>";
         // $my_head.="	</DataObject>";
         // $my_head.="  </PageMap>";
         // $my_head.="-->";
         $ratingwidth = $data_album['total_rating'] > 0 ? $data_album['total_rating'] * 100 / ($data_album['click_rating'] * 5) * 0.01 : 0;
         $xtpl->assign('RATINGVALUE', $data_album['total_rating'] > 0 ? round($data_album['total_rating'] / $data_album['click_rating'], 1) : 0);
         $xtpl->assign('RATINGCOUNT', $data_album['click_rating']);
         $xtpl->assign('REVIEWCOUNT', $data_album['total_rating']);
         $xtpl->assign('RATINGWIDTH', round($ratingwidth, 2));
         $xtpl->assign('LINK_RATE', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module . '&' . NV_OP_VARIABLE . '=rating&album_id=' . $data_album['album_id']);
         $data_album['capturedate'] = nv_date('d-m-Y', $data_album['capturedate']);
         $xtpl->assign('DATA', $data_album);
         $xtpl->parse('main');
         return $xtpl->text('main');
     }
 }
开发者ID:hpleduit,项目名称:module_photos,代码行数:42,代码来源:module.block_detail.php


示例8: nv_comment_new

 function nv_comment_new($block_config)
 {
     global $db, $site_mods, $db_slave, $module_info, $global_config;
     $module = $block_config['module'];
     $mod_data = $site_mods[$module]['module_data'];
     $sql = "SELECT * FROM " . NV_PREFIXLANG . "_comment WHERE module = " . $db->quote($module) . " AND status=1 ORDER BY post_time DESC LIMIT " . $block_config['numrow'];
     $result = $db_slave->query($sql);
     $array_comment = array();
     $array_news_id = array();
     while ($comment = $result->fetch()) {
         $array_comment[] = $comment;
         $array_news_id[] = $comment['id'];
     }
     if (!empty($array_news_id)) {
         $result = $db_slave->query('SELECT t1.id, t1.alias AS alias_id, t2.alias AS alias_cat FROM ' . NV_PREFIXLANG . '_' . $mod_data . '_rows t1 INNER JOIN ' . NV_PREFIXLANG . '_' . $mod_data . '_cat t2 ON t1.catid = t2.catid WHERE t1.id IN (' . implode(',', array_unique($array_news_id)) . ') AND status = 1');
         $array_news_id = array();
         while ($row = $result->fetch()) {
             $array_news_id[$row['id']] = $row;
         }
         $mod_file = $site_mods[$module]['module_file'];
         if (file_exists(NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $mod_file . '/block_new_comment.tpl')) {
             $block_theme = $module_info['template'];
         } else {
             $block_theme = 'default';
         }
         $xtpl = new XTemplate('block_new_comment.tpl', NV_ROOTDIR . '/themes/' . $block_theme . '/modules/' . $mod_file);
         $xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
         $xtpl->assign('TEMPLATE', $block_theme);
         foreach ($array_comment as $comment) {
             if (isset($array_news_id[$comment['id']])) {
                 $comment['url_comment'] = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module . '&' . NV_OP_VARIABLE . '=' . $array_news_id[$comment['id']]['alias_cat'] . '/' . $array_news_id[$comment['id']]['alias_id'] . '-' . $comment['id'] . $global_config['rewrite_exturl'], true);
                 $comment['content'] = nv_clean60($comment['content'], $block_config['titlelength']);
                 $comment['post_time'] = nv_date('d/m/Y H:i', $comment['post_time']);
                 $xtpl->assign('COMMENT', $comment);
                 $xtpl->parse('main.loop');
             }
         }
         $xtpl->parse('main');
         return $xtpl->text('main');
     }
 }
开发者ID:NukeVietCMS,项目名称:CodeWeb,代码行数:41,代码来源:global.block_new_comment.php


示例9: nv_date

        $sth->bindValue(':q_blood_pressure', '%' . $q . '%');
    }
    $sth->execute();
    $num_items = $sth->fetchColumn();
    $db->select('*')->order('id DESC')->limit($per_page)->offset(($page - 1) * $per_page);
    $sth = $db->prepare($db->sql());
    if (!empty($q)) {
        $sth->bindValue(':q_card_code', '%' . $q . '%');
        $sth->bindValue(':q_dose', '%' . $q . '%');
        $sth->bindValue(':q_weight', '%' . $q . '%');
        $sth->bindValue(':q_pulse', '%' . $q . '%');
        $sth->bindValue(':q_blood_pressure', '%' . $q . '%');
    }
    $sth->execute();
}
$row['member']['birthday'] = !empty($row['member']['birthday']) ? nv_date('d/m/Y', $row['member']['birthday']) : '';
$xtpl = new XTemplate($op . '.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
$xtpl->assign('LANG', $lang_module);
$xtpl->assign('GLANG', $lang_global);
$xtpl->assign('NV_LANG_VARIABLE', NV_LANG_VARIABLE);
$xtpl->assign('NV_LANG_DATA', NV_LANG_DATA);
$xtpl->assign('NV_BASE_ADMINURL', NV_BASE_ADMINURL);
$xtpl->assign('NV_NAME_VARIABLE', NV_NAME_VARIABLE);
$xtpl->assign('NV_OP_VARIABLE', NV_OP_VARIABLE);
$xtpl->assign('MODULE_NAME', $module_name);
$xtpl->assign('NV_ASSETS_DIR', NV_ASSETS_DIR);
$xtpl->assign('OP', $op);
$xtpl->assign('ROW', $row);
$xtpl->assign('Q', $q);
if ($show_view) {
    if (!empty($q)) {
开发者ID:hoangvtien,项目名称:module-blood-bank,代码行数:31,代码来源:donation_person.php


示例10: nv_md5safe

     $data_insert['md5username'] = nv_md5safe($array_register['username']);
     $data_insert['password'] = $password;
     $data_insert['email'] = $array_register['email'];
     $data_insert['first_name'] = $array_register['first_name'];
     $data_insert['last_name'] = $array_register['last_name'];
     $data_insert['your_question'] = $your_question;
     $data_insert['answer'] = $array_register['answer'];
     $data_insert['checknum'] = $checknum;
     $data_insert['users_info'] = nv_base64_encode(serialize($query_field));
     $userid = $db->insert_id($sql, 'userid', $data_insert);
     if (!$userid) {
         die(reg_result(array('status' => 'error', 'input' => '', 'mess' => $lang_module['err_no_save_account'])));
     } else {
         if ($global_config['allowuserreg'] == 2) {
             $subject = $lang_module['account_active'];
             $message = sprintf($lang_module['account_active_info'], $array_register['first_name'], $global_config['site_name'], NV_MY_DOMAIN . NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=active&userid=' . $userid . '&checknum=' . $checknum, $array_register['username'], $array_register['email'], nv_date('H:i d/m/Y', NV_CURRENTTIME + 86400));
             $send = nv_sendmail($global_config['site_email'], $array_register['email'], $subject, $message);
             if ($send) {
                 $info = $lang_module['account_active_mess'];
             } else {
                 $info = $lang_module['account_active_mess_error_mail'];
             }
         } else {
             $info = $lang_module['account_register_to_admin'];
         }
         $nv_redirect = '';
         die(reg_result(array('status' => 'ok', 'input' => '', 'mess' => $info)));
     }
 } else {
     $sql = "INSERT INTO " . NV_USERS_GLOBALTABLE . "\n\t\t(username, md5username, password, email, first_name, last_name, gender, photo, birthday, regdate,\n\t\tquestion, answer, passlostkey, view_mail, remember, in_groups,\n\t\tactive, checknum, last_login, last_ip, last_agent, last_openid, idsite) VALUES (\n\t\t:username,\n\t\t:md5username,\n\t\t:password,\n\t\t:email,\n\t\t:first_name,\n\t\t:last_name,\n\t\t'', '', 0, " . NV_CURRENTTIME . ",\n\t\t:your_question,\n\t\t:answer,\n\t\t'', 0, 1, '', 1, '', 0, '', '', '', " . $global_config['idsite'] . ")";
     $data_insert = array();
开发者ID:NukeVietCMS,项目名称:CodeWeb,代码行数:31,代码来源:register.php


示例11: sprintf

                        $xtpl->parse('extUpd.loop.updateNotLastest');
                    } else {
                        $xtpl->assign('UPDNOTE', sprintf($lang_module['extUpdNote3'], NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=extensions&amp;' . NV_OP_VARIABLE . '=update&amp;eid=' . $value['id'] . '&amp;fid=' . $updateVersion['fid'] . '&amp;checksess=' . md5($value['id'] . $updateVersion['fid'] . $global_config['sitekey'] . session_id())));
                        $xtpl->parse('extUpd.loop.updateLastest');
                    }
                } elseif (!$value['origin']) {
                    $note = $lang_module['extNote1'];
                    $icon = 'fa-exclamation-triangle text-danger';
                    $xtpl->parse('extUpd.loop.note2');
                } else {
                    $note = $lang_module['extNote5'];
                    $icon = 'fa-check text-success';
                }
                $xtpl->assign('EXTNOTE', $note);
                $xtpl->assign('EXTICON', $icon);
                $xtpl->parse('extUpd.loop');
                ++$a;
            }
            $xtpl->assign('EXTUPDDATE', nv_date('d/m/Y H:i', $extUpdDate));
            $xtpl->assign('LINKNEWEXT', NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=extensions&amp;' . NV_OP_VARIABLE . '=newest');
            $xtpl->parse('extUpd');
            echo $xtpl->text('extUpd');
        }
    }
    die;
}
$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,代码来源:checkupdate.php


示例12: array

         $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;
 }
 // Them vao tieu de trang
 if (!empty($orderby)) {
     $page_title .= ' ' . sprintf($lang_module['listusers_sort_by'], $lang_module['listusers_sort_by_' . $orderby], $lang_module['listusers_order_' . $sortby]);
 }
 // Tieu de khi phan trang
开发者ID:anhtunguyen,项目名称:vietnamguide,代码行数:31,代码来源:memberlist.php


示例13: array

        $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']);
            $admins[$row['admin_id']]['options']['allow_modify_files'] = array($lang_module['allow_modify_files'], !empty($allow_modify_files) ? $lang_global['yes'] : $lang_global['no']);
            $admins[$row['admin_id']]['options']['allow_create_subdirectories'] = array($lang_module['allow_create_subdirectories'], !empty($allow_create_subdirectories) ? $lang_global['yes'] : $lang_global['no']);
            $admins[$row['admin_id']]['options']['allow_modify_subdirectories'] = array($lang_module['allow_modify_subdirectories'], !empty($allow_modify_subdirectories) ? $lang_global['yes'] : $lang_global['no']);
            $admins[$row['admin_id']]['options']['regtime'] = array($lang_module['regtime'], nv_date('l, d/m/Y H:i', $row['regdate']));
            $admins[$row['admin_id']]['options']['last_login'] = array($lang_module['last_login'], $last_login);
            $admins[$row['admin_id']]['options']['last_ip'] = array($lang_module['last_ip'], $row['last_ip']);
            $admins[$row['admin_id']]['options']['browser'] = array($lang_module['browser'], $browser['name']);
            $admins[$row['admin_id']]['options']['os'] = array($lang_module['os'], $os['name']);
        }
    }
}
if (!empty($admins)) {
    if ($global_config['authors_detail_main'] or $numrows == 1) {
        $xtpl = new XTemplate('main.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
        foreach ($admins as $id => $values) {
            $xtpl->assign('ID', $id);
            $xtpl->assign('CAPTION', $values['caption']);
            if (!empty($values['thead']['edit'])) {
                $xtpl->assign('EDIT_HREF', $values['thead']['edit'][0]);
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:main.php


示例14: nv_admin_theme

function nv_admin_theme($contents, $head_site = 1)
{
    global $global_config, $lang_global, $admin_mods, $site_mods, $admin_menu_mods, $module_name, $module_file, $module_info, $admin_info, $db, $page_title, $submenu, $select_options, $op, $set_active_op, $array_lang_admin, $my_head, $my_footer, $array_mod_title, $array_url_instruction, $op, $client_info;
    $dir_template = '';
    if ($head_site == 1) {
        $file_name_tpl = 'main.tpl';
        if (file_exists(NV_ROOTDIR . '/themes/' . $global_config['admin_theme'] . '/system/' . $file_name_tpl)) {
            $dir_template = NV_ROOTDIR . '/themes/' . $global_config['admin_theme'] . '/system';
        } else {
            $dir_template = NV_ROOTDIR . '/themes/admin_default/system';
            $global_config['admin_theme'] = 'admin_default';
        }
    } else {
        $file_name_tpl = 'content.tpl';
        if (file_exists(NV_ROOTDIR . '/themes/' . $global_config['admin_theme'] . '/system/' . $file_name_tpl)) {
            $dir_template = NV_ROOTDIR . '/themes/' . $global_config['admin_theme'] . '/system';
        } else {
            $dir_template = NV_ROOTDIR . '/themes/admin_default/system';
            $global_config['admin_theme'] = 'admin_default';
        }
    }
    $global_config['site_name'] = empty($global_config['site_name']) ? NV_SERVER_NAME : $global_config['site_name'];
    $xtpl = new XTemplate($file_name_tpl, $dir_template);
    $xtpl->assign('NV_SITE_COPYRIGHT', $global_config['site_name'] . ' [' . $global_config['site_email'] . '] ');
    $xtpl->assign('NV_SITE_NAME', $global_config['site_name']);
    $xtpl->assign('NV_SITE_TITLE', $global_config['site_name'] . ' ' . NV_TITLEBAR_DEFIS . ' ' . $lang_global['admin_page'] . ' ' . NV_TITLEBAR_DEFIS . ' ' . $module_info['custom_title']);
    $xtpl->assign('SITE_DESCRIPTION', $global_config['site_description']);
    $xtpl->assign('NV_CHECK_PASS_MSTIME', (intval($global_config['admin_check_pass_time']) - 62) * 1000);
    $xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
    $xtpl->assign('NV_ADMINDIR', NV_ADMINDIR);
    $xtpl->assign('NV_BASE_ADMINURL', NV_BASE_ADMINURL);
    $xtpl->assign('NV_ASSETS_DIR', NV_ASSETS_DIR);
    $xtpl->assign('MODULE_NAME', $module_name);
    $xtpl->assign('MODULE_FILE', $module_file);
    $xtpl->assign('NV_ADMIN_THEME', $global_config['admin_theme']);
    $xtpl->assign('LANG', $lang_global);
    if (file_exists(NV_ROOTDIR . '/themes/' . $global_config['admin_theme'] . '/css/' . $module_file . '.css')) {
        $xtpl->assign('NV_CSS_MODULE_THEME', NV_BASE_SITEURL . 'themes/' . $global_config['admin_theme'] . '/css/' . $module_file . '.css');
        $xtpl->parse('main.css_module');
    } elseif (file_exists(NV_ROOTDIR . '/themes/admin_default/css/' . $module_file . '.css')) {
        $xtpl->assign('NV_CSS_MODULE_THEME', NV_BASE_SITEURL . 'themes/admin_default/css/' . $module_file . '.css');
        $xtpl->parse('main.css_module');
    }
    $xtpl->assign('NV_LANG_VARIABLE', NV_LANG_VARIABLE);
    $xtpl->assign('NV_LANG_INTERFACE', NV_LANG_INTERFACE);
    $xtpl->assign('NV_NAME_VARIABLE', NV_NAME_VARIABLE);
    $xtpl->assign('NV_OP_VARIABLE', NV_OP_VARIABLE);
    $xtpl->assign('NV_SITE_TIMEZONE_OFFSET', round(NV_SITE_TIMEZONE_OFFSET / 3600));
    $xtpl->assign('NV_CURRENTTIME', nv_date('T', NV_CURRENTTIME));
    $xtpl->assign('NV_COOKIE_PREFIX', $global_config['cookie_prefix']);
    if (file_exists(NV_ROOTDIR . '/themes/' . $global_config['admin_theme'] . '/js/' . $module_file . '.js')) {
        $xtpl->assign('NV_JS_MODULE', NV_BASE_SITEURL . 'themes/' . $global_config['admin_theme'] . '/js/' . $module_file . '.js');
        $xtpl->parse('main.module_js');
    }
    if (defined('NV_EDITOR') and nv_function_exists('nv_add_editor_js')) {
        $xtpl->assign('NV_ADD_EDITOR_JS', nv_add_editor_js());
        $xtpl->parse('main.nv_add_editor_js');
    }
    if ($head_site == 1) {
        $xtpl->assign('NV_GO_CLIENTSECTOR', $lang_global['go_clientsector']);
        $lang_site = !empty($site_mods) ? NV_LANG_DATA : $global_config['site_lang'];
        $xtpl->assign('NV_GO_CLIENTSECTOR_URL', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . $lang_site);
        $xtpl->assign('NV_LOGOUT', $lang_global['admin_logout_title']);
        if (!empty($array_lang_admin)) {
            $xtpl->assign('NV_LANGDATA', $lang_global['langdata']);
            $xtpl->assign('NV_LANGDATA_CURRENT', $array_lang_admin[NV_LANG_DATA]);
            foreach ($array_lang_admin as $lang_i => $lang_name) {
                $xtpl->assign('DISABLED', $lang_i == NV_LANG_DATA ? " class=\"disabled\"" : "");
                $xtpl->assign('LANGVALUE', $lang_name);
                $xtpl->assign('LANGOP', NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . $lang_i);
                $xtpl->parse('main.langdata.option');
            }
            $xtpl->parse('main.langdata');
        }
        // Top_menu
        $top_menu = $admin_mods;
        if (sizeof($top_menu) > 8) {
            if ($module_name != 'authors') {
                unset($top_menu['authors']);
            }
            if ($module_name != 'language') {
                unset($top_menu['language']);
            }
        }
        foreach ($top_menu as $m => $v) {
            if (!empty($v['custom_title'])) {
                $array_submenu = nv_get_submenu($m);
                $xtpl->assign('TOP_MENU_CLASS', $array_submenu ? ' class="dropdown"' : '');
                $xtpl->assign('TOP_MENU_HREF', $m);
                $xtpl->assign('TOP_MENU_NAME', $v['custom_title']);
                if (!empty($array_submenu)) {
                    $xtpl->parse('main.top_menu_loop.has_sub');
                    foreach ($array_submenu as $mop => $submenu_i) {
                        $xtpl->assign('SUBMENULINK', NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $m . '&amp;' . NV_OP_VARIABLE . '=' . $mop);
                        $xtpl->assign('SUBMENUTITLE', $submenu_i);
                        $xtpl->parse('main.top_menu_loop.submenu.submenu_loop');
                    }
                    $xtpl->parse('main.top_menu_loop.submenu');
                }
                $xtpl->parse('main.top_menu_loop');
//.........这里部分代码省略.........
开发者ID:anhtunguyen,项目名称:vietnamguide,代码行数:101,代码来源:theme.php


示例15: nv_generate_page

        $base_url .= '&q=' . $q;
    }
    $generate_page = nv_generate_page($base_url, $num_items, $per_page, $page);
    if (!empty($generate_page)) {
        $xtpl->assign('NV_GENERATE_PAGE', $generate_page);
        $xtpl->parse('main.view.generate_page');
    }
    while ($view = $sth->fetch()) {
        if (NV_CURRENTTIME >= $view['date_start'] and (empty($view['uses_per_coupon']) or $view['uses_per_coupon_count'] < $view['uses_per_coupon']) and (empty($view['date_end']) or NV_CURRENTTIME < $view['date_end'])) {
            $view['status'] = $lang_module['coupons_active'];
        } else {
            $view['status'] = $lang_module['coupons_inactive'];
        }
        $view['discount_text'] = $view['type'] == 'p' ? '%' : ' ' . $pro_config['money_unit'];
        $view['date_start'] = empty($view['date_start']) ? '' : nv_date('d/m/Y', $view['date_start']);
        $view['date_end'] = empty($view['date_end']) ? '' : nv_date('d/m/Y', $view['date_end']);
        $view['link_view'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=coupons_view&amp;id=' . $view['id'];
        $view['link_edit'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=' . $op . '&amp;id=' . $view['id'];
        $view['link_delete'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=' . $op . '&amp;delete_id=' . $view['id'] . '&amp;delete_checkss=' . md5($view['id'] . NV_CACHE_PREFIX . $client_info['session_id']);
        $xtpl->assign('VIEW', $view);
        $xtpl->parse('main.view.loop');
    }
    $xtpl->parse('main.view');
}
if (!empty($error)) {
    $xtpl->assign('ERROR', implode('<br />', $error));
    $xtpl->parse('main.error');
}
$array_select_type = array('p' => $lang_module['coupons_type_percentage'], 'f' => $lang_module['coupons_type_fixed_amount']);
foreach ($array_select_type as $key => $title) {
    $xtpl->assign('OPTION', array('key' => $key, 'title' => $title, 'selected' => $key == $row['type'] ? ' selected="selected"' : ''));
开发者ID:hoangvtien,项目名称:module-shops,代码行数:31,代码来源:coupons.php


示例16: nv_html_site_js

/**
 * nv_html_site_js()
 *
 * @param bool $html
 * @return
 */
function nv_html_site_js($html = true)
{
    global $global_config, $module_info, $module_name, $module_file, $lang_global, $op, $client_info;
    $jsDef = "var nv_siteroot=\"" . NV_BASE_SITEURL . "\",nv_sitelang=\"" . NV_LANG_INTERFACE . "\",nv_name_variable=\"" . NV_NAME_VARIABLE . "\",nv_fc_variable=\"" . NV_OP_VARIABLE . "\",nv_lang_variable=\"" . NV_LANG_VARIABLE . "\",nv_module_name=\"" . $module_name . "\",nv_func_name=\"" . $op . "\",nv_is_user=" . (int) defined("NV_IS_USER") . ", nv_my_ofs=" . round(NV_SITE_TIMEZONE_OFFSET / 3600) . ",nv_my_abbr=\"" . nv_date("T", NV_CURRENTTIME) . "\",nv_cookie_prefix=\"" . $global_config['cookie_prefix'] . "\",nv_check_pass_mstime=" . (intval($global_config['user_check_pass_time']) - 62) * 1000 . ",nv_area_admin=0,theme_responsive=" . (int) ($global_config['current_theme_type'] == 'r');
    if (defined('NV_IS_DRAG_BLOCK')) {
        $jsDef .= ',drag_block=1,blockredirect="' . nv_base64_encode($client_info['selfurl']) . '",selfurl="' . $client_info['selfurl'] . '",block_delete_confirm="' . $lang_global['block_delete_confirm'] . '",block_outgroup_confirm="' . $lang_global['block_outgroup_confirm'] . '",blocks_saved="' . $lang_global['blocks_saved'] . '",blocks_saved_error="' . $lang_global['blocks_saved_error'] . '",post_url="' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=themes&' . NV_OP_VARIABLE . '=",func_id=' . $module_info['funcs'][$op]['func_id'] . ',module_theme="' . $global_config['module_theme'] . '"';
    }
    $jsDef .= ";";
    $return = array();
    $return[] = array('ext' => 0, 'content' => $jsDef);
    $return[] = array('ext' => 1, 'content' => NV_BASE_SITEURL . NV_ASSETS_DIR . "/js/jquery/jquery.min.js" 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP nv_db_cache函数代码示例发布时间:2022-05-15
下一篇:
PHP nv_convertfromBytes函数代码示例发布时间: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