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


PHP nv_insert_logs函数代码示例

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


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

示例1: nv_del_cat

/**
 * nv_del_cat()
 *
 * @param mixed $catid
 * @return
 */
function nv_del_cat($catid)
{
    global $db, $module_name, $module_data, $admin_info, $nv_Cache;
    $sql = 'SELECT parentid, title FROM ' . NV_PREFIXLANG . '_' . $module_data . '_categories WHERE id=' . $catid;
    list($p, $title) = $db->query($sql)->fetch(3);
    $sql = 'SELECT id, fileupload, fileimage FROM ' . NV_PREFIXLANG . '_' . $module_data . ' WHERE catid=' . $catid;
    $result = $db->query($sql);
    $ids = array();
    while (list($id, $fileupload, $fileimage) = $result->fetch(3)) {
        $ids[] = $id;
    }
    if (!empty($ids)) {
        $ids = implode(',', $ids);
        $sql = 'DELETE FROM ' . NV_PREFIXLANG . '_comment WHERE module=' . $db->quote($module_name) . ' AND id IN (' . $ids . ')';
        $db->query($sql);
        $sql = 'DELETE FROM ' . NV_PREFIXLANG . '_' . $module_data . '_report WHERE fid IN (' . $ids . ')';
        $db->query($sql);
    }
    $sql = 'DELETE FROM ' . NV_PREFIXLANG . '_' . $module_data . ' WHERE catid=' . $catid;
    $db->query($sql);
    $sql = 'SELECT id FROM ' . NV_PREFIXLANG . '_' . $module_data . '_categories WHERE parentid=' . $catid;
    $result = $db->query($sql);
    while (list($id) = $result->fetch(3)) {
        nv_del_cat($id);
    }
    $sql = 'DELETE FROM ' . NV_PREFIXLANG . '_' . $module_data . '_categories WHERE id=' . $catid;
    $db->query($sql);
    $nv_Cache->delMod($module_name);
    nv_insert_logs(NV_LANG_DATA, $module_data, 'Delete Category', $title, $admin_info['userid']);
}
开发者ID:NukeVlad,项目名称:module-download,代码行数:36,代码来源:cat.php

示例2: nv_del_cat

/**
 * nv_del_cat()
 * 
 * @param mixed $catid
 * @return
 */
function nv_del_cat($catid)
{
    global $db, $module_data, $admin_info;
    $sql = "SELECT `parentid`, `title` FROM `" . NV_PREFIXLANG . "_" . $module_data . "_categories` WHERE `id`=" . $catid;
    $result = $db->sql_query($sql);
    list($p, $title) = $db->sql_fetchrow($result);
    $sql = "SELECT `id`, `fileupload`, `fileimage` FROM `" . NV_PREFIXLANG . "_" . $module_data . "` WHERE `catid`=" . $catid;
    $result = $db->sql_query($sql);
    $ids = array();
    while (list($id, $fileupload, $fileimage) = $db->sql_fetchrow($result)) {
        $ids[] = $id;
        //Khong xao file vi co the co truong hop file dung chung
        /*
                if(!empty($fileupload))
                {
                $fileupload = explode("[NV]",$fileupload);
                
                foreach($fileupload as $file)
                {
                $file = substr($file,strlen(NV_BASE_SITEURL));
                if ( ! empty( $file ) and file_exists( NV_ROOTDIR . '/' . $file ) )
                {
                @nv_deletefile( NV_ROOTDIR . '/' . $file );
                }
                }
                }
        
                $fileimage = substr($array['fileimage'],strlen(NV_BASE_SITEURL));
                if ( ! empty( $fileimage ) and file_exists( NV_ROOTDIR . '/' . $fileimage ) )
                {
                @nv_deletefile( NV_ROOTDIR . '/' . $fileimage );
                }*/
    }
    if (!empty($ids)) {
        $ids = implode(",", $ids);
        $sql = "DELETE FROM `" . NV_PREFIXLANG . "_" . $module_data . "_comments` WHERE `fid` IN (" . $ids . ")";
        $db->sql_query($sql);
        $sql = "DELETE FROM `" . NV_PREFIXLANG . "_" . $module_data . "_report` WHERE `fid` IN (" . $ids . ")";
        $db->sql_query($sql);
    }
    $sql = "DELETE FROM `" . NV_PREFIXLANG . "_" . $module_data . "` WHERE `catid`=" . $catid;
    $db->sql_query($sql);
    $sql = "SELECT `id` FROM `" . NV_PREFIXLANG . "_" . $module_data . "_categories` WHERE `parentid`=" . $catid;
    $result = $db->sql_query($sql);
    while (list($id) = $db->sql_fetchrow($result)) {
        nv_del_cat($id);
    }
    $sql = "DELETE FROM `" . NV_PREFIXLANG . "_" . $module_data . "_categories` WHERE `id`=" . $catid;
    $db->sql_query($sql);
    nv_insert_logs(NV_LANG_DATA, $module_data, "Delete Category", $title, $admin_info['userid']);
}
开发者ID:atarubi,项目名称:nuke-viet,代码行数:57,代码来源:cat.php

示例3: nv_del_cat

function nv_del_cat($catid, $db, $module_data, $BL)
{
    global $admin_info;
    $sql = "SELECT parentid, title FROM " . $BL->table_prefix . "_categories WHERE id=" . $catid;
    list($parentid, $catTitle) = $db->query($sql)->fetch(3);
    $sql = "SELECT id FROM " . $BL->table_prefix . "_categories WHERE parentid=" . $catid;
    $result = $db->query($sql);
    while (list($id) = $result->fetch(3)) {
        nv_del_cat($id, $db, $module_data, $BL);
    }
    // Xoa bang danh muc
    $sql = "DELETE FROM " . $BL->table_prefix . "_categories WHERE id=" . $catid;
    $db->query($sql);
    // Cap nhat thong ke danh muc
    $BL->fixCat($parentid);
    // Ghi nhat ky
    nv_insert_logs(NV_LANG_DATA, $module_data, $BL->lang('categoriesDelete'), $catTitle, $admin_info['userid']);
}
开发者ID:hoangvtien,项目名称:blog,代码行数:18,代码来源:categories.php

示例4: nv_del_cat

/**
 * nv_del_cat()
 *
 * @param mixed $catid
 * @return
 */
function nv_del_cat($catid)
{
    global $db, $module_name, $module_data, $admin_info, $nv_Cache;
    $sql = 'SELECT parentid, title FROM ' . NV_MOD_TABLE . '_categories WHERE id=' . $catid;
    list($p, $title) = $db->query($sql)->fetch(3);
    $sql = 'SELECT id, fileimage FROM ' . NV_MOD_TABLE . ' WHERE catid=' . $catid;
    $result = $db->query($sql);
    $ids = array();
    while (list($id, $fileimage) = $result->fetch(3)) {
        $ids[] = $id;
        nv_delete_notification(NV_LANG_DATA, $module_name, 'report', $id);
    }
    if (!empty($ids)) {
        $ids = implode(',', $ids);
        $sql = 'DELETE FROM ' . NV_PREFIXLANG . '_comment WHERE module=' . $db->quote($module_name) . ' AND id IN (' . $ids . ')';
        $db->query($sql);
        $sql = 'DELETE FROM ' . NV_MOD_TABLE . '_report WHERE fid IN (' . $ids . ')';
        $db->query($sql);
        $sql = 'DELETE FROM ' . NV_MOD_TABLE . '_detail WHERE id IN (' . $ids . ')';
        $db->query($sql);
        $sql = 'DELETE FROM ' . NV_MOD_TABLE . '_files WHERE download_id IN (' . $ids . ')';
        $db->query($sql);
        $sql = 'SELECT * FROM ' . NV_MOD_TABLE . '_tags_id WHERE id IN (' . $ids . ')';
        $result = $db->query($sql);
        while ($row = $result->fetch()) {
            $sql = 'UPDATE ' . NV_MOD_TABLE . '_tags SET numdownload=numdownload-1 WHERE did=' . $row['did'];
            $db->query($sql);
        }
        $sql = 'DELETE FROM ' . NV_MOD_TABLE . '_tags_id WHERE id IN (' . $ids . ')';
        $db->query($sql);
    }
    $sql = 'DELETE FROM ' . NV_MOD_TABLE . ' WHERE catid=' . $catid;
    $db->query($sql);
    $sql = 'SELECT id FROM ' . NV_MOD_TABLE . '_categories WHERE parentid=' . $catid;
    $result = $db->query($sql);
    while (list($id) = $result->fetch(3)) {
        nv_del_cat($id);
    }
    $sql = 'DELETE FROM ' . NV_MOD_TABLE . '_categories WHERE id=' . $catid;
    $db->query($sql);
    $nv_Cache->delMod($module_name);
    nv_insert_logs(NV_LANG_DATA, $module_data, 'Delete Category', $title, $admin_info['userid']);
}
开发者ID:htuyen1994,项目名称:module-download,代码行数:49,代码来源:cat.php

示例5: nv_del_user

/**
 * nv_del_user()
 *
 * @param mixed $userid
 * @return
 */
function nv_del_user($userid)
{
    global $db, $global_config, $nv_Request, $module_name, $user_info, $lang_module;
    $sql = 'SELECT group_id, username, first_name, last_name, email, photo, in_groups, idsite FROM ' . NV_MOD_TABLE . ' WHERE userid=' . $userid;
    $row = $db->query($sql)->fetch(3);
    if (empty($row)) {
        $return = 0;
    }
    list($group_id, $username, $first_name, $last_name, $email, $photo, $in_groups, $idsite) = $row;
    if ($global_config['idsite'] > 0 and $idsite != $global_config['idsite']) {
        return 0;
    }
    $query = $db->query('SELECT COUNT(*) FROM ' . NV_MOD_TABLE . '_groups_users WHERE group_id IN (1,2,3) AND userid=' . $userid);
    if ($query->fetchColumn()) {
        return 0;
    } else {
        $userdelete = !empty($first_name) ? $first_name . ' (' . $username . ')' : $username;
        $result = $db->exec('DELETE FROM ' . NV_MOD_TABLE . ' WHERE userid=' . $userid);
        if (!$result) {
            return 0;
        }
        $in_groups = explode(',', $in_groups);
        $db->query('UPDATE ' . NV_MOD_TABLE . '_groups SET numbers = numbers-1 WHERE group_id IN (SELECT group_id FROM ' . NV_MOD_TABLE . '_groups_users WHERE userid=' . $userid . ' AND approved = 1)');
        $db->query('UPDATE ' . NV_MOD_TABLE . '_groups SET numbers = numbers-1 WHERE group_id=' . (($group_id == 7 or in_array(7, $in_groups)) ? 7 : 4));
        $db->query('DELETE FROM ' . NV_MOD_TABLE . '_groups_users WHERE userid=' . $userid);
        $db->query('DELETE FROM ' . NV_MOD_TABLE . '_openid WHERE userid=' . $userid);
        $db->query('DELETE FROM ' . NV_MOD_TABLE . '_info WHERE userid=' . $userid);
        nv_insert_logs(NV_LANG_DATA, $module_name, 'log_del_user', 'userid ' . $userid, $user_info['userid']);
        if (!empty($photo) and is_file(NV_ROOTDIR . '/' . $photo)) {
            @nv_deletefile(NV_ROOTDIR . '/' . $photo);
        }
        $subject = $lang_module['delconfirm_email_title'];
        $message = sprintf($lang_module['delconfirm_email_content'], $userdelete, $global_config['site_name']);
        $message = nl2br($message);
        nv_sendmail($global_config['site_email'], $email, $subject, $message);
        return $userid;
    }
}
开发者ID:nukeviet,项目名称:nukeviet,代码行数:44,代码来源:functions.php

示例6: elseif

    } elseif (!is_array($tables)) {
        $tables = array($tables);
    }
    $tab_list = array();
    $result = $db->query("SHOW TABLES LIKE '" . $db_config['prefix'] . "_%'");
    while ($item = $result->fetch(3)) {
        $tab_list[] = $item[0];
    }
    $result->closeCursor();
    $contents = array();
    $contents['tables'] = empty($tables) ? $tab_list : array_values(array_intersect($tab_list, $tables));
    $contents['type'] = $type != 'str' ? 'all' : 'str';
    $contents['savetype'] = $ext != 'sql' ? 'gz' : 'sql';
    $contents['filename'] = tempnam(NV_ROOTDIR . '/' . NV_TEMP_DIR, NV_TEMPNAM_PREFIX);
    include NV_ROOTDIR . '/includes/core/dump.php';
    $result = nv_dump_save($contents);
    if (!empty($result)) {
        nv_insert_logs(NV_LANG_DATA, $module_name, $lang_module['download'], 'File name: ' . basename($contents['filename']), $admin_info['userid']);
        $content['mime'] = $contents['savetype'] == 'gz' ? 'application/x-gzip' : 'text/x-sql';
        $contents['fname'] = $db->dbname . '.sql';
        if ($contents['savetype'] == 'gz') {
            $contents['fname'] .= '.gz';
        }
        //Download file
        require_once NV_ROOTDIR . '/includes/class/download.class.php';
        $download = new download($result[0], NV_ROOTDIR . '/' . NV_TEMP_DIR, basename($contents['fname']));
        $download->download_file();
        exit;
    }
}
die;
开发者ID:lzhao18,项目名称:nukeviet,代码行数:31,代码来源:download.php

示例7: die

** @Project: NUKEVIET SUPPORT ONLINE
** @Author: Viet Group (vietgroup.biz@gmail.com)
** @Copyright: VIET GROUP
** @Craetdate: 19.08.2011
** @Website: http://vietgroup.biz
*/
if (!defined('NV_IS_FILE_ADMIN')) {
    die('Stop!!!');
}
$id = $nv_Request->get_int('id', 'post', 0);
if (empty($id)) {
    die('NO_' . $id);
}
$query = "SELECT * FROM `" . NV_PREFIXLANG . "_" . $module_data . "` WHERE `id`=" . $id;
$result = $db->sql_query($query);
$numrows = $db->sql_numrows($result);
if ($numrows != 1) {
    die('NO_' . $id);
}
nv_insert_logs(NV_LANG_DATA, $module_name, $lang_module['log_del_support'], "supportid  " . $id, $admin_info['userid']);
$query = "DELETE FROM `" . NV_PREFIXLANG . "_" . $module_data . "` WHERE `id` = " . $id;
$db->sql_query($query);
nv_fix_weight_sp();
if ($db->sql_affectedrows() > 0) {
    nv_del_moduleCache($module_name);
} else {
    die('NO_' . $id);
}
include NV_ROOTDIR . "/includes/header.php";
echo 'OK_' . $id;
include NV_ROOTDIR . "/includes/footer.php";
开发者ID:nguyenchien1102,项目名称:module_support,代码行数:31,代码来源:del.php

示例8: die

<?php

/**
 * @Project NUKEVIET 3.0
 * @Author VINADES.,JSC (contact@vinades.vn)
 * @Copyright (C) 2010 VINADES.,JSC. All rights reserved
 * @Createdate 2-10-2010 18:49
 */
if (!defined('NV_IS_FILE_ADMIN')) {
    die('Stop!!!');
}
$bid = $nv_Request->get_int('bid', 'post', 0);
$contents = "NO_" . $bid;
list($bid) = $db->sql_fetchrow($db->sql_query("SELECT `bid` FROM `" . NV_PREFIXLANG . "_" . $module_data . "_block_cat` WHERE `bid`=" . intval($bid) . ""));
if ($bid > 0) {
    nv_insert_logs(NV_LANG_DATA, $module_name, 'log_del_blockcat', "block_catid " . $bid, $admin_info['userid']);
    $query = "DELETE FROM `" . NV_PREFIXLANG . "_" . $module_data . "_block_cat` WHERE `bid`=" . $bid . "";
    if ($db->sql_query($query)) {
        $db->sql_freeresult();
        $query = "DELETE FROM `" . NV_PREFIXLANG . "_" . $module_data . "_block` WHERE `bid`=" . $bid . "";
        $db->sql_query($query);
        nv_fix_block_cat();
        nv_del_moduleCache($module_name);
        $contents = "OK_" . $bid;
    }
}
include NV_ROOTDIR . "/includes/header.php";
echo $contents;
include NV_ROOTDIR . "/includes/footer.php";
开发者ID:syphuonglam,项目名称:creative-portal,代码行数:29,代码来源:del_block_cat.php

示例9: nv_insert_logs

            die;
        } else {
            $error = $lang_module['errorsave'];
        }
    } else {
        $stmt = $db->prepare("UPDATE " . NV_PREFIXLANG . "_" . $module_data . "_playlist_cat SET title= :title, alias = :alias, status = :status, private_mode = :private_mode, description= :description, image= :image, keywords= :keywords, edit_time=" . NV_CURRENTTIME . " WHERE playlist_id =" . $playlist_id);
        $stmt->bindParam(':title', $title, PDO::PARAM_STR);
        $stmt->bindParam(':alias', $alias, PDO::PARAM_STR);
        $stmt->bindParam(':status', $status, PDO::PARAM_STR);
        $stmt->bindParam(':private_mode', $private_mode, PDO::PARAM_STR);
        $stmt->bindParam(':description', $description, PDO::PARAM_STR);
        $stmt->bindParam(':image', $image, PDO::PARAM_STR);
        $stmt->bindParam(':keywords', $keywords, PDO::PARAM_STR);
        $stmt->execute();
        if ($stmt->execute()) {
            nv_insert_logs(NV_LANG_DATA, $module_name, 'log_edit_playlistcat', "playlist_id " . $playlist_id, $admin_info['userid']);
            Header('Location: ' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op);
            die;
        } else {
            $error = $lang_module['errorsave'];
        }
    }
}
$array_status = array($lang_global['no'], $lang_global['yes'], $lang_module['playlist_waiting_approve']);
$array_private_mode = array($lang_module['playlist_private_off'], $lang_module['playlist_private_on']);
$playlist_id = $nv_Request->get_int('playlist_id', 'get', 0);
if ($playlist_id > 0) {
    list($playlist_id, $title, $alias, $description, $image, $keywords, $status, $private_mode) = $db->query("SELECT playlist_id, title, alias, description, image, keywords, status, private_mode FROM " . NV_PREFIXLANG . "_" . $module_data . "_playlist_cat where playlist_id=" . $playlist_id)->fetch(3);
    $lang_module['add_playlist_cat'] = $lang_module['edit_playlist_cat'];
}
$lang_global['title_suggest_max'] = sprintf($lang_global['length_suggest_max'], 65);
开发者ID:hongoctrien,项目名称:module-videos,代码行数:31,代码来源:playlists.php

示例10: die

<?php

/**
 * @Project NUKEVIET 3.0
 * @Author VINADES.,JSC (contact@vinades.vn)
 * @Copyright (C) 2010 VINADES., JSC. All rights reserved
 * @Createdate 3/11/2010 21:1
 */
if (!defined('NV_IS_FILE_ADMIN')) {
    die('Stop!!!');
}
if (!defined('NV_IS_AJAX')) {
    die('Wrong URL');
}
$id = $nv_Request->get_int('id', 'post', 0);
nv_insert_logs(NV_LANG_DATA, $module_name, 'log_del_client', "clientid " . $id, $admin_info['userid']);
if (empty($id)) {
    die('Stop!!!');
}
$query = "SELECT * FROM `" . NV_BANNERS_CLIENTS_GLOBALTABLE . "` WHERE `id`=" . $id;
$result = $db->sql_query($query);
$numrows = $db->sql_numrows($result);
if ($numrows != 1) {
    die('Stop!!!');
}
$banners_id = array();
$query = "SELECT `id`, `file_name`,`file_name_tmp` FROM `" . NV_BANNERS_ROWS_GLOBALTABLE . "` WHERE `clid`=" . $id;
$result = $db->sql_query($query);
while ($row = $db->sql_fetchrow($result)) {
    if (!empty($row['file_name']) and is_file(NV_ROOTDIR . '/' . $row['file_name'])) {
        @nv_deletefile(NV_ROOTDIR . '/' . $row['file_name']);
开发者ID:syphuonglam,项目名称:creative-portal,代码行数:31,代码来源:del_client.php

示例11: VALUES

         $post['exp_time'] = 0;
     }
     $post['public'] = $nv_Request->get_int('public', 'post', 0);
     if ($post['public'] != 1) {
         $post['public'] = 0;
     }
     if (isset($post['id'])) {
         $query = "UPDATE `" . NV_GROUPS_GLOBALTABLE . "` SET \n                    `title`=" . $db->dbescape($post['title']) . ", \n                    `content`=" . $db->dbescape($post['content']) . ", \n                    `exp_time`='" . $post['exp_time'] . "', \n                    `public`= " . $post['public'] . " \n                    WHERE `group_id`=" . $post['id'] . " LIMIT 1";
         $ok = $db->sql_query($query);
     } else {
         $query = "INSERT INTO `" . NV_GROUPS_GLOBALTABLE . "` \n                VALUES (NULL, " . $db->dbescape($post['title']) . ", \n                " . $db->dbescape($post['content']) . ", \n                " . NV_CURRENTTIME . ", \n                " . $post['exp_time'] . ", \n                '', " . $post['public'] . ", " . ($groupcount + 1) . ", 1);";
         $ok = $post['id'] = $db->sql_query_insert_id($query);
     }
     if ($ok) {
         nv_del_moduleCache($module_name);
         nv_insert_logs(NV_LANG_DATA, $module_name, $log_title, "Id: " . $post['id'], $admin_info['userid']);
         die("OK");
     } else {
         die($lang_module['errorsave']);
     }
 }
 if ($nv_Request->isset_request('edit', 'get')) {
     $post = $groupsList[$post['id']];
     $post['content'] = nv_editor_br2nl($post['content']);
     $post['exp_time'] = !empty($post['exp_time']) ? date("d.m.Y", $post['exp_time']) : "";
     $post['public'] = $post['public'] ? " checked=\"checked\"" : "";
 } else {
     $post['title'] = $post['content'] = $post['exp_time'] = "";
     $post['public'] = "";
 }
 if (!empty($post['content'])) {
开发者ID:atarubi,项目名称:nuke-viet,代码行数:31,代码来源:groups.php

示例12: nv_nl2br

    if (!empty($title) and !empty($modfile) and !in_array($title, $modules_site) and !in_array($title, $modules_admin) and preg_match($global_config['check_module'], $title) and preg_match($global_config['check_module'], $modfile)) {
        $version = '';
        $author = '';
        $note = nv_nl2br($note, '<br />');
        $module_data = preg_replace('/(\\W+)/i', '_', $title);
        if (empty($array_site_cat_module) or in_array($modfile, $array_site_cat_module)) {
            try {
                $sth = $db->prepare('INSERT INTO ' . $db_config['prefix'] . '_setup_extensions (type, title, is_sys, is_virtual, basename, table_prefix, version, addtime, author, note) VALUES ( \'module\', :title, 0, 0, :basename, :table_prefix, :version, ' . NV_CURRENTTIME . ', :author, :note)');
                $sth->bindParam(':title', $title, PDO::PARAM_STR);
                $sth->bindParam(':basename', $modfile, PDO::PARAM_STR);
                $sth->bindParam(':table_prefix', $module_data, PDO::PARAM_STR);
                $sth->bindParam(':version', $version, PDO::PARAM_STR);
                $sth->bindParam(':author', $author, PDO::PARAM_STR);
                $sth->bindParam(':note', $note, PDO::PARAM_STR);
                if ($sth->execute()) {
                    nv_insert_logs(NV_LANG_DATA, $module_name, $lang_module['vmodule_add'] . ' ' . $module_data, '', $admin_info['userid']);
                    Header('Location: ' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=setup&setmodule=' . $title . '&checkss=' . md5($title . NV_CHECK_SESSION));
                    die;
                }
            } catch (PDOException $e) {
                trigger_error($e->getMessage());
            }
        }
    }
}
$page_title = $lang_module['vmodule_add'];
$xtpl = new XTemplate('vmodule.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
if ($error) {
    $lang_module['vmodule_blockquote'] = $lang_module['vmodule_exit'];
    $xtpl->parse('main.error');
}
开发者ID:nukeviet,项目名称:nukeviet,代码行数:31,代码来源:vmodule.php

示例13: catch

                    $groups_download = '2';
                }
                if ($row['who_download'] == 2) {
                    $groups_download = '3';
                } else {
                    $groups_download = '6';
                }
                $db->query("INSERT " . NV_PREFIXLANG . "_" . $mod_data . "_categories (id, parentid, title, alias, description, groups_view, groups_download, weight, status) SELECT id, parentid, title, alias, description, " . $groups_view . " , " . $groups_download . ", weight, status  FROM " . NV_PREFIXLANG3 . "_" . $mod_data3 . "_categories Where id = " . $row['id']);
            }
        } catch (PDOException $e) {
            die($e->getMessage());
        }
        $db->query("INSERT " . NV_PREFIXLANG . "_" . $mod_data . "_tmp  SELECT  * FROM " . NV_PREFIXLANG3 . "_" . $mod_data3 . "_tmp");
        $db->query("INSERT " . NV_PREFIXLANG . "_" . $mod_data . "_report  SELECT  * FROM " . NV_PREFIXLANG3 . "_" . $mod_data3 . "_report");
        nv_del_moduleCache($mod_name);
        nv_insert_logs(NV_LANG_DATA, $mod_name, 'Convert', '', $admin_info['userid']);
        Header('Location: ' . nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $mod_name, true));
        die;
    }
} else {
    $result = $db->query('SELECT title, module_data, custom_title FROM ' . NV3_PREFIX . '_' . NV_LANG_DATA . '_modules WHERE module_file="download"');
    $array_nv3_download = $result->fetchAll();
    $xtpl = new XTemplate($op . '.tpl', NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $module_file);
    $xtpl->assign('LANG', $lang_module);
    $xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
    $xtpl->assign('NV_NAME_VARIABLE', NV_NAME_VARIABLE);
    $xtpl->assign('NV_OP_VARIABLE', NV_OP_VARIABLE);
    $xtpl->assign('MODULE_NAME', $module_name);
    $xtpl->assign('OP', $op);
    foreach ($site_mods as $mod_name => $mod_data) {
        if ($mod_data['module_file'] == 'download') {
开发者ID:hongoctrien,项目名称:module_c34to40,代码行数:31,代码来源:download.php

示例14: nv_site_theme

                    echo nv_site_theme($contents);
                    include NV_ROOTDIR . '/includes/footer.php';
                    exit;
                }
                $query_field['userid'] = $userid;
                $db->query('INSERT INTO ' . NV_USERS_GLOBALTABLE . '_info (' . implode(', ', array_keys($query_field)) . ') VALUES (' . implode(', ', array_values($query_field)) . ')');
                $db->query('UPDATE ' . NV_GROUPS_GLOBALTABLE . ' SET numbers = numbers+1 WHERE group_id=4');
                $subject = $lang_module['account_register'];
                $message = sprintf($lang_module['account_register_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, $array_register['username']);
                nv_sendmail($global_config['site_email'], $array_register['email'], $subject, $message);
                $info = $lang_module['register_ok'] . "<br /><br />\n";
                $info .= "<img border=\"0\" src=\"" . NV_BASE_SITEURL . "images/load_bar.gif\"><br /><br />\n";
                $info .= '[<a href="' . NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '">' . $lang_module['redirect_to_login'] . '</a>]';
                $contents = user_info_exit($info);
                $contents .= '<meta http-equiv="refresh" content="5;url=' . nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name, true) . '" />';
                nv_insert_logs(NV_LANG_DATA, $module_name, $lang_module['register'], $array_register['username'] . ' | ' . $client_info['ip'] . ' | Simple', 0);
                include NV_ROOTDIR . '/includes/header.php';
                echo nv_site_theme($contents);
                include NV_ROOTDIR . '/includes/footer.php';
                exit;
            }
        }
    }
    $array_register['info'] = '<span style="color:#fb490b;">' . $error . '</span>';
} else {
    $array_register['first_name'] = $array_register['username'] = $array_register['email'] = '';
    $array_register['password'] = $array_register['re_password'] = $array_register['your_question'] = $array_register['answer'] = '';
    $array_register['question'] = $array_register['agreecheck'] = 0;
    $array_register['info'] = $lang_module['info'];
}
$array_register['agreecheck'] = $array_register['agreecheck'] ? ' checked="checked"' : '';
开发者ID:lzhao18,项目名称:nukeviet,代码行数:31,代码来源:register.php

示例15: nv_del_moduleCache

            $data_insert['filepath'] = $data['filepath'];
            $data_insert['otherpath'] = $data['otherpath'];
            $data_insert['roomid'] = $data['roomid'];
            $data_insert['fieldid'] = $data['fieldid'];
            $data_insert['down'] = $data['down'];
            $data_insert['view'] = $data['view'];
            $data_insert['userid'] = $data['userid'];
            $data_insert['type'] = $data['type'];
            $data_insert['sign'] = $data['sign'];
            $data_insert['signtime'] = $data['signtime'];
            $data_insert['organid'] = $data['organid'];
            $newid = $db->insert_id($sql, 'id', $data_insert);
            if ($newid > 0) {
                nv_del_moduleCache($module_name);
                nv_fix_cat_row($data['catid']);
                nv_insert_logs(NV_LANG_DATA, $module_name, $lang_module['addcontent'], $data['title'], $user_info['userid']);
                $nv_redirect = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=" . $module_name;
                redict_link($lang_module['upload_ok'], $lang_module['upload_view'], $nv_redirect);
            } else {
                $error = $lang_module['errorsave'];
            }
            $db->sqlreset();
        }
    }
}
if ($data['signtime'] == 0) {
    $data['signtime'] = "";
} elseif ($data['signtime'] > 0) {
    $data['signtime'] = date("d/m/Y", $data['signtime']);
}
$contents = upload_content($data, $error);
开发者ID:ngoctu2008,项目名称:nv4_module_laws,代码行数:31,代码来源:content.php


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