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


PHP nv_sendmail函数代码示例

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


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

示例1: cron_auto_sendmail_error_log

/**
 * cron_auto_sendmail_error_log()
 *
 * @return
 */
function cron_auto_sendmail_error_log()
{
    global $global_config, $lang_global;
    $result = true;
    $error_log_fileext = preg_match("/[a-z]+/i", NV_LOGS_EXT) ? NV_LOGS_EXT : 'log';
    $file = NV_ROOTDIR . '/' . NV_LOGS_DIR . '/error_logs/sendmail.' . $error_log_fileext;
    if (file_exists($file) and filesize($file) > 0) {
        $result = nv_sendmail(array($global_config['site_name'], $global_config['site_email']), $global_config['error_send_email'], sprintf($lang_global['error_sendmail_subject'], $global_config['site_name']), $lang_global['error_sendmail_content'], $file);
        if ($result) {
            if (!@unlink($file)) {
                $result = false;
            }
        }
    }
    return $result;
}
开发者ID:nukeplus,项目名称:nuke,代码行数:21,代码来源:error_log_sendmail.php

示例2: 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

示例3: nv_SendMail2User

/**
 * nv_SendMail2User()
 *
 * @param mixed $cid
 * @param mixed $fcontent
 * @param mixed $ftitle
 * @param mixed $femail
 * @param mixed $full_name
 * @return void
 */
function nv_SendMail2User($cid, $fcontent, $ftitle, $femail, $full_name)
{
    global $db, $module_data;
    $email_list = array();
    $sql = "SELECT `email`, `admins` FROM `" . NV_PREFIXLANG . "_" . $module_data . "_rows` WHERE `id` =" . $cid;
    $result = $db->sql_query($sql);
    list($email, $admins) = $db->sql_fetchrow($result);
    if (!empty($email)) {
        $email_list[] = $email;
    }
    if (!empty($admins)) {
        $admins = array_map("trim", explode(";", $admins));
        $a_l = array();
        foreach ($admins as $adm) {
            if (preg_match("/^([0-9]+)\\/([0-1]{1})\\/([0-1]{1})\\/([0-1]{1})\$/i", $adm)) {
                $adm2 = array_map("trim", explode("/", $adm));
                if ($adm2[3] == 1) {
                    $a_l[] = intval($adm2[0]);
                }
            }
        }
        if (!empty($a_l)) {
            $a_l = implode(",", $a_l);
            $sql = "SELECT t2.email as admin_email FROM `" . NV_AUTHORS_GLOBALTABLE . "` AS t1 INNER JOIN  `" . NV_USERS_GLOBALTABLE . "` AS t2 ON t1.admin_id = t2.userid WHERE t1.lev!=0 AND t1.is_suspend=0 AND t1.admin_id IN (" . $a_l . ")";
            $result = $db->sql_query($sql);
            while ($row = $db->sql_fetchrow($result)) {
                if (nv_check_valid_email($row['admin_email']) == "") {
                    $email_list[] = $row['admin_email'];
                }
            }
        }
    }
    $email_list = array_unique($email_list);
    if (!empty($email_list)) {
        $from = array($full_name, $femail);
        foreach ($email_list as $to) {
            @nv_sendmail($from, $to, $ftitle, $fcontent);
        }
    }
}
开发者ID:atarubi,项目名称:nuke-viet,代码行数:50,代码来源:main.php

示例4: 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

示例5: nv_SendMail2User

/**
 * nv_SendMail2User()
 *
 * @param mixed $cid
 * @param mixed $fcontent
 * @param mixed $ftitle
 * @param mixed $femail
 * @param mixed $full_name
 * @return void
 */
function nv_SendMail2User($cid, $fcontent, $ftitle, $femail, $full_name)
{
    global $db, $module_data, $db_config;
    $email_list = array();
    $sql = 'SELECT email, admins FROM ' . NV_PREFIXLANG . '_' . $module_data . '_department WHERE id =' . $cid;
    $result = $db->query($sql);
    list($email, $admins) = $result->fetch(3);
    if (!empty($email)) {
        $email_list[] = $email;
    }
    if (!empty($admins)) {
        $admins = array_map('trim', explode(';', $admins));
        $a_l = array();
        foreach ($admins as $adm) {
            if (preg_match('/^([0-9]+)\\/([0-1]{1})\\/([0-1]{1})\\/([0-1]{1})$/i', $adm)) {
                $adm2 = array_map('trim', explode('/', $adm));
                if ($adm2[3] == 1) {
                    $a_l[] = intval($adm2[0]);
                }
            }
        }
        if (!empty($a_l)) {
            $a_l = implode(',', $a_l);
            $sql = 'SELECT t2.email as admin_email FROM ' . NV_AUTHORS_GLOBALTABLE . ' t1 INNER JOIN ' . NV_USERS_GLOBALTABLE . ' t2 ON t1.admin_id = t2.userid WHERE t1.lev!=0 AND t1.is_suspend=0 AND t1.admin_id IN (' . $a_l . ')';
            $result = $db->query($sql);
            while ($row = $result->fetch()) {
                if (nv_check_valid_email($row['admin_email']) == '') {
                    $email_list[] = $row['admin_email'];
                }
            }
        }
    }
    if (!empty($email_list)) {
        $from = array($full_name, $femail);
        $email_list = array_unique($email_list);
        @nv_sendmail($from, $email_list, $ftitle, $fcontent);
    }
}
开发者ID:lzhao18,项目名称:nukeviet,代码行数:48,代码来源:main.php

示例6: die

 $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'];
 $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 {
     $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_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name, true), $array_register['username']);
     nv_sendmail($global_config['site_email'], $array_register['email'], $subject, $message);
     if (!empty($global_config['auto_login_after_reg'])) {
         // Auto login
         $array_user = array('userid' => $userid, 'last_agent' => '', 'last_ip' => '', 'last_login' => 0, 'last_openid' => '');
         validUserLog($array_user, 1, '');
         $nv_redirect = nv_redirect_decrypt($nv_redirect);
         $url = !empty($nv_redirect) ? $nv_redirect : NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name;
     } else {
         $url = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=login';
         if (!empty($nv_redirect)) {
             $url .= '&nv_redirect=' . $nv_redirect;
         }
     }
     $nv_redirect = '';
     die(reg_result(array('status' => 'ok', 'input' => nv_url_rewrite($url, true), 'mess' => $lang_module['register_ok'])));
 }
开发者ID:NukeVietCMS,项目名称:CodeWeb,代码行数:31,代码来源:register.php

示例7: die

if (empty($row)) {
    die('NO');
}
list($username, $first_name, $last_name, $email, $photo, $idsite) = $row;
if ($global_config['idsite'] > 0 and $idsite != $global_config['idsite']) {
    die('NO');
}
$query = $db->query('SELECT COUNT(*) FROM ' . NV_GROUPS_GLOBALTABLE . '_users WHERE group_id IN (1,2,3) AND userid=' . $userid);
if ($query->fetchColumn()) {
    die('ERROR_' . $lang_module['delete_group_system']);
} else {
    $userdelete = !empty($first_name) ? $first_name . ' (' . $username . ')' : $username;
    $result = $db->exec('DELETE FROM ' . NV_USERS_GLOBALTABLE . ' WHERE userid=' . $userid);
    if (!$result) {
        die('NO');
    }
    $db->query('UPDATE ' . NV_GROUPS_GLOBALTABLE . ' SET numbers = numbers-1 WHERE group_id IN (SELECT group_id FROM ' . NV_GROUPS_GLOBALTABLE . '_users WHERE userid=' . $userid . ')');
    $db->query('UPDATE ' . NV_GROUPS_GLOBALTABLE . ' SET numbers = numbers-1 WHERE group_id=4');
    $db->query('DELETE FROM ' . NV_GROUPS_GLOBALTABLE . '_users WHERE userid=' . $userid);
    $db->query('DELETE FROM ' . NV_USERS_GLOBALTABLE . '_openid WHERE userid=' . $userid);
    $db->query('DELETE FROM ' . NV_USERS_GLOBALTABLE . '_info WHERE userid=' . $userid);
    nv_insert_logs(NV_LANG_DATA, $module_name, 'log_del_user', 'userid ' . $userid, $admin_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);
    die('OK');
}
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:del.php

示例8: UpdatePoint

            $db->query("UPDATE " . $db_config['prefix'] . "_" . $module_data . "_orders SET transaction_status=" . $transaction_status . ", transaction_id=" . $transaction_id . ", transaction_count=transaction_count+1 WHERE order_id=" . $order_id);
            //Cap nhat diem tich luy
            UpdatePoint($data_content);
            nv_insert_logs(NV_LANG_DATA, $module_name, 'Log payment product', "Order code: " . $data_content['order_code'], $admin_info['userid']);
        }
        // Gửi mail xác nhận thanh toán
        $content = '';
        $email_contents_table = call_user_func('email_new_order_payment', $content, $data_content, $data_pro, true);
        $checkss = md5($order_id . $global_config['sitekey'] . session_id());
        $review_url = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=payment&order_id=' . $order_id . '&checkss=' . $checkss;
        $replace_data = array('order_code' => $data_content['order_code'], 'order_name' => $data_content['order_name'], 'order_email' => $data_content['order_email'], 'order_phone' => $data_content['order_phone'], 'order_address' => $data_content['order_address'], 'order_note' => $data_content['order_note'], 'order_total' => nv_number_format($data_content['order_total']), 'unit_total' => $data_content['unit_total'], 'dateup' => nv_date("d-m-Y", $data_content['order_time']), 'moment' => nv_date("H:i", $data_content['order_time']), 'review_url' => '<a href="' . $global_config['site_url'] . $review_url . '">' . $lang_module['here'] . '</a>', 'table_product' => $email_contents_table, 'site_url' => $global_config['site_url'], 'site_name' => $global_config['site_name']);
        $content_file = NV_ROOTDIR . '/' . NV_DATADIR . '/' . NV_LANG_DATA . '_' . $module_data . '_order_payment_content.txt';
        if (file_exists($content_file)) {
            $content = file_get_contents($content_file);
            if (empty($content)) {
                $content = $lang_module['order_email_payment'];
            }
            $content = nv_editor_br2nl($content);
        } else {
            $content = $lang_module['order_email_payment'];
        }
        foreach ($replace_data as $key => $value) {
            $content = str_replace('{' . $key . '}', $value, $content);
        }
        $email_contents = call_user_func('email_new_order_payment', $content, $data_content, $data_pro);
        nv_sendmail(array($global_config['site_name'], $global_config['site_email']), $data_content['order_email'], sprintf($lang_module['document_payment_email_order_payment'], $module_info['custom_title'], $data_content['order_code']), $email_contents);
        $contents = $lang_module['order_submit_pay_ok'];
        nv_del_moduleCache($module_name);
    }
}
die($contents);
开发者ID:hoangvtien,项目名称:module-shops,代码行数:31,代码来源:active_pay.php

示例9: array

                 $xtpl->assign('SITE_NAME', $global_config['site_name']);
                 $xtpl->assign('SITE_SLOGAN', $global_config['site_description']);
                 $xtpl->assign('SITE_EMAIL', $global_config['site_email']);
                 $xtpl->assign('SITE_FONE', $global_config['site_phone']);
                 $xtpl->assign('SITE_URL', $global_config['site_url']);
                 $xtpl->assign('TITLE', $title);
                 $xtpl->assign('CONTENT', $mess);
                 $xtpl->assign('AUTHOR_SIG', $my_sig);
                 $xtpl->assign('AUTHOR_NAME', $admin_info['username']);
                 $xtpl->assign('AUTHOR_POS', $admin_info['position']);
                 $xtpl->assign('AUTHOR_EMAIL', $my_mail);
                 $xtpl->parse('main');
                 $content = $xtpl->text('main');
                 $from = array($admin_info['username'], $my_mail);
                 $to = $row_user['email'];
                 $send = nv_sendmail($from, $to, nv_EncString($title), $content);
                 if (!$send) {
                     nv_info_die($lang_global['error_info_caption'], $lang_global['site_info'], $lang_global['error_sendmail_admin'], 1);
                 }
             }
         }
         Header("Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=suspend&id=" . $id);
     }
 } else {
     $adminpass = $new_reason = "";
     $clean_history = $sendmail = 0;
 }
 $contents['change_suspend']['new_suspend_caption'] = !empty($error) ? $error : $lang_module['chg_is_suspend' . $new_suspend];
 $contents['change_suspend']['new_suspend_is_error'] = !empty($error) ? 1 : 0;
 $contents['change_suspend']['new_suspend_action'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . NV_OP_VARIABLE . "=suspend&amp;admin_id=" . $admin_id;
 $contents['change_suspend']['sendmail'] = array($lang_module['suspend_sendmail'], $sendmail);
开发者ID:syphuonglam,项目名称:creative-portal,代码行数:31,代码来源:suspend.php

示例10: md5

                $rand = 6;
            }
            $row['safekey'] = md5(nv_genpass($rand));
            $stmt = $db->prepare('UPDATE ' . NV_USERS_GLOBALTABLE . ' SET safekey= :safekey WHERE userid=' . $user_info['userid']);
            $stmt->bindParam(':safekey', $row['safekey'], PDO::PARAM_STR);
            $stmt->execute();
            $nv_Request->set_Session('safesend', 0);
        }
        $ss_safesend = $nv_Request->get_int('safesend', 'session', 0);
        if ($ss_safesend < NV_CURRENTTIME) {
            $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['safe_send_content'], $name, $sitename, $row['safekey']);
            @nv_sendmail($global_config['site_email'], $row['email'], $lang_module['safe_send_subject'], $message);
            $ss_safesend = NV_CURRENTTIME + 600;
            $nv_Request->set_Session('safesend', $ss_safesend);
        }
        $ss_safesend = ceil(($ss_safesend - NV_CURRENTTIME) / 60);
        die(json_encode(array('status' => 'ok', 'input' => '', 'mess' => sprintf($lang_module['safe_send_ok'], $ss_safesend))));
    }
    $safe_key = nv_substr($nv_Request->get_title('safe_key', 'post', '', 1), 0, 32);
    if (empty($row['safekey']) or $safe_key != $row['safekey']) {
        die(json_encode(array('status' => 'error', 'input' => 'safe_key', 'mess' => $lang_module['verifykey_error'])));
    }
    $stmt = $db->prepare('UPDATE ' . NV_USERS_GLOBALTABLE . ' SET safemode=1, safekey= :safekey WHERE userid=' . $user_info['userid']);
    $stmt->bindParam(':safekey', $row['safekey'], PDO::PARAM_STR);
    $stmt->execute();
    die(json_encode(array('status' => 'ok', 'input' => nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=editinfo', true), 'mess' => $lang_module['safe_activate_ok'])));
}
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:editinfo.php

示例11: rand

 }
 if ($data['send']) {
     if ($data['answer'] == $row['answer']) {
         $nv_Request->unset_request('lostpass_seccode', 'session');
         $rand = rand(NV_UPASSMIN, NV_UPASSMAX);
         if ($rand < 6) {
             $rand = 6;
         }
         $password_new = nv_genpass($rand);
         $passlostkey = md5($row['userid'] . $password_new . $global_config['sitekey']);
         $k = md5($row['userid'] . $passlostkey . $global_config['sitekey']);
         $subject = sprintf($lang_module['lostpass_email_subject'], $global_config['site_name']);
         $link_lostpass_content_email = NV_MY_DOMAIN . NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op . '&u=' . $row['userid'] . '&k=' . $k;
         $row['full_name'] = nv_show_name_user($row['first_name'], $row['last_name'], $row['username']);
         $message = sprintf($lang_module['lostpass_email_content'], $row['full_name'], $global_config['site_name'], $link_lostpass_content_email, $row['username']);
         $ok = nv_sendmail($global_config['site_email'], $row['email'], $subject, $message);
         if ($ok) {
             $sql = "UPDATE " . NV_USERS_GLOBALTABLE . " SET passlostkey='" . $passlostkey . "' WHERE userid=" . $row['userid'];
             $db->query($sql);
             if (!empty($check_email)) {
                 $row['email'] = substr($row['email'], 0, 3) . '***' . substr($row['email'], -6);
             }
             $info = sprintf($lang_module['lostpass_content_mess'], $row['email']);
         } else {
             $info = $lang_global['error_sendmail'];
         }
         $nv_redirect = !empty($data['nv_redirect']) ? nv_base64_decode($data['nv_redirect']) : nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name, true);
         $contents = user_info_exit($info);
         $contents .= '<meta http-equiv="refresh" content="10;url=' . $nv_redirect . '" />';
         include NV_ROOTDIR . '/includes/header.php';
         echo nv_site_theme($contents);
开发者ID:anhtunguyen,项目名称:vietnamguide,代码行数:31,代码来源:lostpass.php

示例12: cron_blog_newsletters

function cron_blog_newsletters($table_data, $num_onesend)
{
    global $db, $global_config, $db_config;
    $num_onesend = empty($num_onesend) ? 5 : intval($num_onesend);
    if (!empty($table_data)) {
        $table_data = explode("_", $table_data);
        $table_data = array_map("trim", $table_data);
        $lang = $table_data[0];
        unset($table_data[0]);
        $module_data = implode("_", $table_data);
        // Lay module file, module name
        $sql = "SELECT title, module_file FROM " . NV_MODULES_TABLE . " WHERE module_data=" . $db->quote($module_data);
        $result = $db->query($sql);
        list($module_name, $module_file) = $result->fetch(3);
        $table_data = $db_config['prefix'] . "_" . $lang . "_" . $module_data;
        // Lay cau hinh gui mail
        $sql = "SELECT config_value FROM " . $table_data . "_config WHERE config_name=" . $db->quote('numberResendNewsletter');
        $result = $db->query($sql);
        $numberResendNewsletter = $result->fetchColumn();
        // Lay tin can gui (uu tien cac tin round 1 hon)
        $sql = "SELECT a.*, b.title, b.alias, b.hometext FROM " . $table_data . "_send a INNER JOIN " . $table_data . "_rows b ON a.pid=b.id WHERE a.status!=2 AND b.status=1 ORDER BY a.status DESC, a.id ASC LIMIT 0,1";
        $result = $db->query($sql);
        if ($result->rowCount()) {
            // Du lieu gui
            $data_send = $result->fetch();
            $data_send['lastid'] = intval($data_send['lastid']);
            $data_send['link'] = NV_MY_DOMAIN . NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . $lang . "&amp;" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . NV_OP_VARIABLE . "=" . $data_send['alias'];
            $data_send['resenddata'] = explode(",", $data_send['resenddata']);
            $data_send['errordata'] = explode(",", $data_send['errordata']);
            // Danh dau la dang gui
            if (empty($data_send['status'])) {
                $db->query("UPDATE " . $table_data . "_send SET status=1, starttime=" . NV_CURRENTTIME . ", round=1 WHERE id=" . $data_send['id']);
            }
            // Goi ngon ngu
            include NV_ROOTDIR . "/modules/" . $module_file . "/language/" . $lang . ".php";
            // Lay nguoi gui lan gui 1
            if ($data_send['round'] <= 1) {
                $sql = "SELECT id, email FROM " . $table_data . "_newsletters WHERE status=1 AND id>" . $data_send['lastid'] . " ORDER BY id ASC LIMIT 0," . $num_onesend;
            } else {
                $sql = "SELECT id, email FROM " . $table_data . "_newsletters WHERE status=1 AND id>" . $data_send['lastid'] . " AND id IN(" . implode(",", $data_send['resenddata']) . ") ORDER BY id ASC LIMIT 0," . $num_onesend;
            }
            $result = $db->query($sql);
            $num = $result->rowCount();
            while ($row = $result->fetch()) {
                if (nv_sendmail(array($global_config['site_name'], $global_config['site_email']), $row['email'], nv_unhtmlspecialchars($data_send['title']), $data_send['hometext'] . "<br /><br />" . $lang_module['newsletterMessage'] . ": <a href=\"" . $data_send['link'] . "\">" . $data_send['link'] . "</a>")) {
                    // Cap nhat lan gui cuoi va so email da gui
                    $db->query("UPDATE " . $table_data . "_newsletters SET numemail=numemail+1, lastsendtime=" . NV_CURRENTTIME . " WHERE id=" . $row['id']);
                } else {
                    // Danh dau cac email bi loi trong lan gui nay
                    $data_send['errordata'][$row['id']] = $row['id'];
                }
                $data_send['lastid'] = $row['id'];
            }
            // Cap nhat lai thong tin
            $sql = array();
            $sql[] = "lastid=" . $data_send['lastid'];
            if ($num < $num_onesend) {
                // Tang so lan gui len 1
                $data_send['round'] = $data_send['round'] + 1;
                // Danh dau da gui xong neu qua so lan gui hoac khong co email loi
                if ($data_send['round'] > $numberResendNewsletter or empty($data_send['errordata'])) {
                    $sql[] = "status=2";
                    $sql[] = "endtime=" . NV_CURRENTTIME;
                } else {
                    $sql[] = "round=" . $data_send['round'];
                    // Du lieu gui lan tiep theo la du lieu loi cua lan nay
                    $sql[] = "resenddata=" . $db->quote(implode(",", $data_send['errordata']));
                    $sql[] = "errordata=''";
                }
            } else {
                // Ghi lai du lieu loi
                $sql[] = "errordata=" . $db->quote($data_send['errordata'] ? implode(",", $data_send['errordata']) : '');
            }
            $db->query("UPDATE " . $table_data . "_send SET " . implode(", ", $sql) . " WHERE id=" . $data_send['id']);
        }
    }
    return true;
}
开发者ID:hoangvtien,项目名称:blog,代码行数:78,代码来源:module_blog_newsletters.php

示例13: array

                 $xtpl->assign('SITE_NAME', $global_config['site_name']);
                 $xtpl->assign('SITE_SLOGAN', $global_config['site_description']);
                 $xtpl->assign('SITE_EMAIL', $global_config['site_email']);
                 $xtpl->assign('SITE_FONE', $global_config['site_phone']);
                 $xtpl->assign('SITE_URL', $global_config['site_url']);
                 $xtpl->assign('TITLE', $title);
                 $xtpl->assign('CONTENT', $mess);
                 $xtpl->assign('AUTHOR_SIG', $my_sig);
                 $xtpl->assign('AUTHOR_NAME', $admin_info['username']);
                 $xtpl->assign('AUTHOR_POS', $admin_info['position']);
                 $xtpl->assign('AUTHOR_EMAIL', $my_mail);
                 $xtpl->parse('main');
                 $content = $xtpl->text('main');
                 $from = array($admin_info['username'], $my_mail);
                 $to = $row_user['email'];
                 $send = nv_sendmail($from, $to, $title, $content);
                 if (!$send) {
                     $page_title = $lang_global['error_info_caption'];
                     $contents = $lang_global['error_sendmail_admin'] . '<meta http-equiv="refresh" content="10;URL=' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '" />';
                     include NV_ROOTDIR . '/includes/header.php';
                     echo nv_admin_theme($contents);
                     include NV_ROOTDIR . '/includes/footer.php';
                 }
             }
         }
         Header('Location: ' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=suspend&id=' . $id);
     }
 } else {
     $adminpass = $new_reason = '';
     $clean_history = $sendmail = 0;
 }
开发者ID:NukeVietCMS,项目名称:CodeWeb,代码行数:31,代码来源:suspend.php

示例14: call_user_func

            }
            $email_contents = call_user_func('email_new_order', $content, $data_order, $data_pro);
            $email_title = empty($order_info) ? $lang_module['order_email_title'] : $lang_module['order_email_edit_title'];
            nv_sendmail(array($global_config['site_name'], $global_config['site_email']), $data_order['order_email'], sprintf($email_title, $module_info['custom_title'], $data_order['order_code']), $email_contents);
            // Them vao notification
            $content = array('order_id' => $data_order['id'], 'order_code' => $data_order['order_code'], 'order_name' => $data_order['order_name']);
            $userid = isset($user_info['userid']) and !empty($user_info['userid']) ? $user_info['userid'] : 0;
            nv_insert_notification($module_name, empty($order_info) ? 'order_new' : 'order_edit', $content, 0, $userid, 1);
            // Gui mail thong bao den nguoi quan ly shops
            $order_url = $global_config['site_url'] . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=or_view&amp;order_id=' . $data_order['id'];
            $lang_module['order_email_thanks'] = sprintf($lang_module['order_email_thanks_to_admin'], $data_order['order_name']);
            $lang_module['order_email_review'] = sprintf($lang_module['order_email_review_to_admin'], $order_url);
            $listmail_notify = nv_listmail_notify();
            if (!empty($listmail_notify)) {
                $email_contents_to_admin = call_user_func('email_new_order', $data_order, $data_pro);
                nv_sendmail(array($global_config['site_name'], $global_config['site_email']), $listmail_notify, sprintf($email_title, $module_info['custom_title'], $data_order['order_code']), $email_contents_to_admin);
            }
            // Chuyen trang xem thong tin don hang vua dat
            unset($_SESSION[$module_data . '_cart']);
            unset($_SESSION[$module_data . '_order_info']);
            unset($_SESSION[$module_data . '_coupons']);
            Header('Location: ' . $review_url);
            $action = 1;
        }
    }
}
// Lay dia diem
$sql = "SELECT id, parentid, title, lev FROM " . $db_config['prefix'] . '_' . $module_data . "_location ORDER BY sort ASC";
$result = $db->query($sql);
while (list($id_i, $parentid_i, $title_i, $lev_i) = $result->fetch(3)) {
    $xtitle_i = '';
开发者ID:hoangvtien,项目名称:module-shops,代码行数:31,代码来源:order.php

示例15: getsongbyID

    $timeout = $nv_Request->get_int($module_name . '_gift', 'cookie', 0);
    if ($timeout == 0 or NV_CURRENTTIME - $timeout > 360) {
        $song = getsongbyID($id);
        if (empty($song)) {
            die($lang_module['err_exist_song']);
        }
        $nv_Request->set_Cookie($module_name . '_gift', NV_CURRENTTIME);
        $sql = "INSERT INTO `" . NV_PREFIXLANG . "_" . $module_data . "_gift` VALUES ( \n\t\t\tNULL, \n\t\t\t" . $db->dbescape($who_send) . ", \n\t\t\t" . $db->dbescape($who_receive) . ", \n\t\t\t" . $db->dbescape($id) . ", \n\t\t\tUNIX_TIMESTAMP(), \n\t\t\t" . $db->dbescape($body) . ", \n\t\t\t" . $setting['auto_gift'] . " \n\t\t)";
        if ($db->sql_query_insert_id($sql)) {
            if ($setting['auto_gift']) {
                nv_del_moduleCache($module_name);
            }
            $link = "<a href=\"" . NV_MY_DOMAIN . nv_url_rewrite($main_header_URL . "=listenone/" . $song['id'] . "/" . $song['ten']) . "\">" . NV_MY_DOMAIN . nv_url_rewrite($main_header_URL . "=listenone/" . $song['id'] . "/" . $song['ten']) . "</a>";
            $subject = $lang_module['sendmail_welcome'] . " \"" . $who_send . "\"";
            $message = sprintf($lang_module['gift_message'], $who_receive, $who_send, NV_MY_DOMAIN, $body, $link);
            nv_sendmail(array($global_config['site_name'], $global_config['site_email']), $email_receive, $subject, $message);
            if ($setting['auto_gift']) {
                die("OK");
            } else {
                die("WAIT");
            }
        } else {
            die($lang_module['send_gift_error']);
        }
    } else {
        die($lang_module['ready_send_gift']);
    }
}
// Them bai hat vao playlist
if ($nv_Request->isset_request('addplaylist', 'post')) {
    if (!defined('NV_IS_AJAX')) {
开发者ID:hongoctrien,项目名称:module-videos,代码行数:31,代码来源:data.php


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