コード例 #1
0
ファイル: index.inc.php プロジェクト: hiproz/zhaotaoci.cc
function send_notice($username, $subject, $body)
{
    global $DT, $msg, $eml, $sms, $wec;
    if (!$username || !$subject || !$body) {
        return;
    }
    if (isset($msg)) {
        send_message($username, $subject, $body);
    }
    if (isset($wec)) {
        send_weixin($username, $subject);
    }
    if (isset($eml) || isset($sms)) {
        $user = userinfo($username);
        if (isset($eml)) {
            send_mail($user['email'], $subject, $body);
        }
        if (isset($sms)) {
            send_sms($user['mobile'], $subject . $DT['sms_sign']);
        }
    }
}
コード例 #2
0
ファイル: validate.inc.php プロジェクト: hiproz/zhaotaoci.cc
         $content .= $ECK[$k] . ' ---------- ' . (in_array($k, $pass) ? '<span style="color:green;">已通过</span>' : '<span style="color:red;">未通过</span>') . '<br/>';
     }
     if ($reason) {
         $content .= '操作原因:' . nl2br($reason) . '<br/>';
     }
     if ($msg) {
         send_message($username, $title, $content);
     }
     if ($eml) {
         send_mail($U['email'], $title, $content);
     }
     if ($sms) {
         send_sms($U['mobile'], '您的会员资料修改审核结果已通过站内信发送,请注意查阅');
     }
     if ($wec) {
         send_weixin($username, '您的会员资料修改审核结果已通过站内信发送,请注意查阅');
     }
     if ($sql1) {
         $db->query("UPDATE {$DT_PRE}member SET " . substr($sql1, 1) . " WHERE userid={$userid}");
     }
     if ($sql2) {
         $db->query("UPDATE {$DT_PRE}company SET " . substr($sql2, 1) . " WHERE userid={$userid}");
     }
     if ($sql3) {
         $db->query("UPDATE {$content_table} SET " . substr($sql3, 1) . " WHERE userid={$userid}");
     }
     $db->query("DELETE FROM {$DT_PRE}member_check WHERE username='******'");
     dmsg('操作成功', '?moduleid=' . $moduleid . '&file=' . $file . '&action=member');
 } else {
     include tpl('validate_show', $module);
 }
コード例 #3
0
ファイル: message.php プロジェクト: hiproz/zhaotaoci.cc
<?php

defined('IN_DESTOON') or exit('Access Denied');
$condition = 'isread=0 AND issend=0 AND status=3';
if ($DT['message_time']) {
    $time = $DT_TIME - $DT['message_time'] * 60;
    $condition .= " AND addtime<{$time}";
}
if ($DT['message_type']) {
    $condition .= " AND typeid IN ({$DT['message_type']})";
}
$msg = $db->get_one("SELECT * FROM {$DT_PRE}message WHERE {$condition} ORDER BY itemid ASC");
if ($msg) {
    $db->query("UPDATE {$DT_PRE}message SET issend=1 WHERE itemid={$msg['itemid']}");
    $user = $db->get_one("SELECT groupid,email,send FROM {$DT_PRE}member WHERE username='******'touser']}'");
    if ($user) {
        if ($user['send']) {
            if (check_group($user['groupid'], $DT['message_group'])) {
                extract($msg);
                $NAME = $L['message_type'];
                $member_url = $MODULE[2]['linkurl'];
                $content = ob_template('message', 'mail');
                send_mail($user['email'], '[' . $NAME[$typeid] . ']' . $title, $content);
                if ($DT['message_weixin']) {
                    send_weixin($msg['touser'], $title . $L['message_weixin']);
                }
            }
        }
    }
}
コード例 #4
0
ファイル: global.func.php プロジェクト: hiproz/zhaotaoci.cc
function admin_notice()
{
    global $DT, $MODULE, $db, $moduleid, $file, $itemid, $action, $reason, $msg, $eml, $sms, $wec;
    if (!is_array($itemid)) {
        return;
    }
    if (count($itemid) == 0) {
        return;
    }
    $S = array('delete' => '已经被删除', 'check' => '已经通过审核', 'reject' => '没有通过审核', 'onsale' => '已经上架', 'unsale' => '已经下架');
    $N = array('honor' => '荣誉资质', 'news' => '公司新闻', 'page' => '公司单页', 'link' => '友情链接');
    if (!isset($S[$action])) {
        return;
    }
    if ($moduleid > 4) {
        $table = get_table($moduleid);
        $name = $MODULE[$moduleid]['name'];
        if ($moduleid == 9) {
            if ($file == 'resume') {
                $table = $db->pre . $file;
                $name = '简历';
            } else {
                $name = '招聘';
            }
        } else {
            if ($moduleid == 16) {
                $name = '商品';
            }
        }
    } else {
        if (isset($N[$file])) {
            $table = $db->pre . $file;
            $name = $N[$file];
        } else {
            return;
        }
    }
    if ($reason == '操作原因') {
        $reason = '';
    }
    $msg = isset($msg) ? 1 : 0;
    if (strlen($reason) > 2) {
        $msg = 1;
    }
    $eml = isset($eml) ? 1 : 0;
    if ($msg == 0 && $eml == 0) {
        return;
    }
    $sms = isset($sms) ? 1 : 0;
    $wec = isset($wec) ? 1 : 0;
    if ($msg == 0) {
        $sms = $wec = 0;
    }
    $result = $db->query("SELECT itemid,title,username,linkurl FROM {$table} WHERE itemid IN (" . implode(',', $itemid) . ")");
    while ($r = $db->fetch_array($result)) {
        $username = $r['username'];
        if (!check_name($username)) {
            continue;
        }
        $title = $r['title'];
        $linkurl = strpos($r['linkurl'], '://') === false ? $MODULE[$moduleid]['linkurl'] . $r['linkurl'] : $r['linkurl'];
        $subject = '您发布的[' . $name . ']' . $title . '(ID:' . $r['itemid'] . ')' . $S[$action];
        $body = '尊敬的会员:<br/>您发布的[' . $name . ']<a href="' . $linkurl . '" target="_blank">' . $title . '</a>(ID:' . $r['itemid'] . ')' . $S[$action] . '!<br/>';
        if ($reason) {
            $body .= '操作原因:<br/>' . $reason . '<br/>';
        }
        $body .= '如果您对此操作有异议,请及时与网站联系。';
        if ($msg) {
            send_message($username, $subject, $body);
        }
        if ($wec) {
            send_weixin($username, $subject);
        }
        if ($eml || $sms) {
            $user = userinfo($username);
            if ($eml) {
                send_mail($user['email'], $subject, $body);
            }
            if ($sms) {
                send_sms($user['mobile'], $subject . $DT['sms_sign']);
            }
        }
    }
}
コード例 #5
0
ファイル: ask.inc.php プロジェクト: hiproz/zhaotaoci.cc
             $subject = '您的[问题]' . dsubstr($a['title'], 30, '...') . '(流水号:' . $a['itemid'] . ')已经回复';
             $content = '尊敬的会员:<br/>您的[问题]' . $a['title'] . '(流水号:' . $a['itemid'] . ')已经回复!<br/>';
             $content .= '请点击下面的链接查看详情:<br/>';
             $content .= '<a href="' . $linkurl . '" target="_blank">' . $linkurl . '</a><br/>';
             $user = userinfo($a['username']);
             if ($msg) {
                 send_message($user['username'], $subject, $content);
             }
             if ($eml) {
                 send_mail($user['email'], $subject, $content);
             }
             if ($sms) {
                 send_sms($user['mobile'], $subject . $DT['sms_sign']);
             }
             if ($wec) {
                 send_weixin($user['username'], $subject);
             }
         }
     }
     dmsg('受理成功', '?moduleid=' . $moduleid . '&file=' . $file . '&status=' . $status);
 } else {
     extract($a);
     if ($status == 0) {
         $status = 1;
         $db->query("UPDATE {$DT_PRE}ask SET status=1,edittime={$DT_TIME} WHERE itemid={$itemid}");
     }
     $addtime = timetodate($addtime, 6);
     $edittime = timetodate($edittime, 6);
     include tpl('ask_edit', $module);
 }
 break;