コード例 #1
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(73);
$msg_obj = new Keke_witkey_msg_tpl_class();
$config_msg_arr = $kekezu->get_table_data("*", "witkey_msg_config", " 1 = 1 ", "config_id desc ", '', '', 'config_id');
$now_msg_arr = db_factory::get_one(" select * from " . TABLEPRE . "witkey_msg_config where k='{$slt_tpl_code}'");
$now_v = unserialize($now_msg_arr['v']);
if (isset($tpl_code)) {
    $msg_tpl = db_factory::query(" select * from " . TABLEPRE . "witkey_msg_tpl where tpl_code='{$tpl_code}'");
    if ($msg_tpl) {
        kekezu::echojson('', 1, $msg_tpl);
    } else {
        echo json_encode(array("status" => 0));
    }
}
$objMsgC = new Keke_witkey_msg_config_class();
if (isset($sbt_edit)) {
    if ($slt_tpl_code) {
        $objMsgC->setWhere("k='{$slt_tpl_code}'");
        $objMsgC->setContent($tar_msg_temp_content);
        $res = $objMsgC->edit_keke_witkey_msg_config();
    }
    if ($res) {
        kekezu::admin_system_log($_lang['edit_sms_tpl']);
        kekezu::admin_show_msg($_lang['edit_sms_tpl_success'], 'index.php?do=msg&view=intertpl&slt_tpl_code=' . $slt_tpl_code, 3, '', 'success');
    }
}
$msg_tpl = db_factory::get_one("select content from " . TABLEPRE . "witkey_msg_config where k='{$slt_tpl_code}'");
$msg_tpl = $msg_tpl['content'];
require $kekezu->_tpl_obj->template(ADMIN_DIRECTORY . '/tpl/admin_msg_' . $view);
コード例 #2
0
ファイル: keke_msg_class.php プロジェクト: huangbinzd/kppwGit
 private function getmessagetpl()
 {
     global $_cache_obj;
     $tpl = $_cache_obj->get("msg_tpl_" . $this->_k . "_cache");
     if (!$tpl) {
         $objMsgConfig = new Keke_witkey_msg_config_class();
         $objMsgConfig->setWhere("k='{$this->_k}'");
         $tpl = $objMsgConfig->query_keke_witkey_msg_config();
         $_cache_obj->set("msg_tpl_" . $this->_k . "_cache", $tpl);
     }
     return $tpl;
 }
コード例 #3
0
 static function notify_user($title, $content, $uid, $username = "")
 {
     if (!$username) {
         $userinfo = kekezu::get_user_info($uid);
         $username = $userinfo['username'];
     }
     if (is_array($content)) {
         $objMsgConfig = new Keke_witkey_msg_config_class();
         $wh = "`k` = '{$content['tpl']}' limit 1";
         $objMsgConfig->setWhere($wh);
         $res = $objMsgConfig->query_keke_witkey_msg_config();
         $content = strtr($res[0]['content'], $content['data']);
     }
     $message_obj = new Keke_witkey_msg_class();
     $message_obj->setTitle($title);
     $message_obj->setContent($content);
     $message_obj->setOn_time(time());
     $message_obj->setTo_uid($uid);
     $message_obj->setTo_username($username);
     $message_obj->create_keke_witkey_msg();
 }
コード例 #4
0
                case 1:
                    switch (!empty($ckb[$k])) {
                        case 1:
                            foreach ($ckb[$k] as $k3 => $v3) {
                                $send_type[$k3] = intval($v3);
                            }
                            break;
                        case 0:
                            foreach ($message_send_type['0'] as $v2) {
                                $send_type[$v2] = intval(0);
                            }
                            break;
                    }
                    break;
            }
            $msg_obj->setWhere("config_id= {$k}");
            $send_type = serialize($send_type);
            $msg_obj->setV($send_type);
            $msg_obj->setOn_time(time());
            $res .= $msg_obj->edit_keke_witkey_msg_config();
        }
    }
    if ($res) {
        kekezu::admin_system_log($_lang['msg_config_log']);
        $kekezu->_cache_obj->set("keke_witkey_msg_config", $msg_config);
        kekezu::admin_show_msg($_lang['sms_internal_config_success'], "index.php?do=msg&view=internal", 3, '', 'success');
    }
} else {
    $page_obj = $kekezu->_page_obj;
    $where = " 1 = 1 ";
    intval($page) or $page = '1';