<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(220);
$lang_arr = keke_lang_class::lang_type();
$url = 'index.php?do=config&view=enclosure';
$objBasicConfigT = new Keke_witkey_basic_config_class();
$config_basic_arr = $objBasicConfigT->query_keke_witkey_basic_config();
foreach ($config_basic_arr as $k => $v) {
    $arrBasicConfig[$v['k']] = $v['v'];
}
if (isset($_POST) && !empty($_POST)) {
    if ($_POST['upload_type'] == '1') {
        unset($_POST['access_key']);
        unset($_POST['secret_key']);
        unset($_POST['qn_bucket']);
        unset($_POST['qn_domain']);
    } else {
        $res = kekezu::check_upload_access($_POST['access_key'], $_POST['secret_key'], $_POST['qn_bucket']);
        !$res and kekezu::admin_show_msg('请核对AccessKey、SecretKey和bucket是否准确!', $url, 3, '', 'warning');
    }
    foreach ($_POST as $k => $v) {
        $objBasicConfigT->setWhere("k = '{$k}'");
        $objBasicConfigT->setV(kekezu::k_input($v));
        $res += $objBasicConfigT->edit_keke_witkey_basic_config();
    }
    kekezu::admin_show_msg('提交成功', $url, 3, '', 'success');
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view);
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(140);
if (isset($submit)) {
    $basic_obj = new Keke_witkey_basic_config_class();
    foreach ($conf as $k => $v) {
        $basic_obj->setWhere("k = '{$k}'");
        $basic_obj->setV($v);
        $res .= $basic_obj->edit_keke_witkey_basic_config();
    }
    !empty($api) and $attent_api = $api or $attent_api = array();
    $basic_obj->setWhere("k = 'attent_api_open'");
    $basic_obj->setV(serialize($attent_api));
    $basic_obj->edit_keke_witkey_basic_config();
    kekezu::admin_system_log($_lang['weibo_config_view']);
    kekezu::admin_show_msg($_lang['weibo_view_config_success'], "index.php?do=msg&view=attention", 3, '', 'success');
} else {
    $attent_api = db_factory::get_count(sprintf(" select v from %switkey_basic_config where type='attent_api'", TABLEPRE));
    $attent_api = unserialize($attent_api);
    $attent_list = kekezu::get_table_data("k,v,desc", "witkey_basic_config", "type='attention'", 'listorder asc ', "", "", "k");
}
require keke_tpl_class::template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
示例#3
0
    if ($s == 'close') {
        db_factory::updatetable(TABLEPRE . 'witkey_basic_config', array('v' => 'close'), array('k' => 'sms_interface'));
        db_factory::updatetable(TABLEPRE . 'witkey_auth_item', array('auth_open' => 0), array('auth_code' => 'mobile'));
    } elseif ($s == 'open') {
        db_factory::updatetable(TABLEPRE . 'witkey_basic_config', array('v' => 'open'), array('k' => 'sms_interface'));
    }
}
$authOpen = db_factory::get_one('select auth_open from ' . TABLEPRE . 'witkey_auth_item where auth_code="mobile"');
if (isset($_POST) && !empty($_POST)) {
    if ($_POST['sms_switch'] == 'close') {
        unset($_POST['mobile_username']);
        unset($_POST['mobile_password']);
    }
    foreach ($_POST as $k => $v) {
        $config_basic_obj->setWhere("k = '{$k}'");
        $config_basic_obj->setV(kekezu::k_input($v));
        $res += $config_basic_obj->edit_keke_witkey_basic_config();
    }
    if ($_POST['credit_is_allow'] == 2) {
        foreach ($model_list as $k => $v) {
            $config = unserialize($v['config']);
            $config['defeated'] = '1';
            keke_task_config::set_task_ext_config($v['model_id'], $config);
        }
    }
    kekezu::admin_system_log($_lang['update'] . $log_nav_arr[$op]);
    $kekezu->_cache_obj->set("keke_witkey_basic_config", $config_basic_arr);
    kekezu::admin_show_msg($_lang['submit_success'], $url, 3, '', 'success');
}
function get_url_rule()
{
示例#4
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$config_basic_obj = new Keke_witkey_basic_config_class();
$config_basic_arr = $config_basic_obj->query_keke_witkey_basic_config();
foreach ($config_basic_arr as $k => $v) {
    $config_arr[$v['k']] = $v['v'];
}
$config_arr['account_pwd'] = base64_decode($config_arr['account_pwd']);
$url = 'index.php?do=config&view=mail';
if (isset($submit)) {
    foreach ($_POST as $k => $v) {
        $config_basic_obj->setWhere("k = '{$k}'");
        if ($k == 'account_pwd') {
            $config_basic_obj->setV(base64_encode($v));
        } else {
            $config_basic_obj->setV($v);
        }
        $res += $config_basic_obj->edit_keke_witkey_basic_config();
    }
    $kekezu->_cache_obj->gc();
    kekezu::admin_system_log($_lang['email_config_param']);
    $kekezu->_cache_obj->set("keke_witkey_basic_config", $config_basic_arr);
    kekezu::admin_show_msg($_lang['submit_success'], $url, 3, '', 'success');
}
if (isset($email)) {
    $mail = new Phpmailer_class();
    if ($config_arr['mail_server_cat'] == "smtp") {
        $mail->IsSMTP();
        $mail->SMTPAuth = true;
        $mail->CharSet = $_K['charset'];
示例#5
0
                    $skin = str_replace('.', '', $skin);
                    $skin && ($skins[] = $skin);
                }
            }
        }
    }
    return array_filter($skins);
}
$objConfigBasicM = new Keke_witkey_basic_config_class();
if (isset($ac)) {
    switch ($ac) {
        case 'ctheme':
            $strObj = strval($obj);
            if (is_dir($strThemePath . $strObj)) {
                $objConfigBasicM->setWhere("k = 'theme'");
                $objConfigBasicM->setV($strObj);
                $res = $objConfigBasicM->edit_keke_witkey_basic_config();
                if ($res) {
                    kekezu::admin_show_msg($_lang['tpl_config_set_success'], 'index.php?do=config&view=tpl', 3, '', 'success');
                } else {
                    kekezu::admin_show_msg('设置失败', 'index.php?do=config&view=tpl', 3, '', 'warning');
                }
            } else {
                kekezu::admin_show_msg('不存在的模板', 'index.php?do=config&view=tpl', 3, '', 'warning');
            }
            break;
        case 'ccolor':
            $strObj = strval($obj);
            if (is_dir($strColorPath . $strObj)) {
                $objConfigBasicM->setWhere("k = 'sitecss'");
                $objConfigBasicM->setV($strObj);
示例#6
0
<?php

if ($op == 'change') {
    $objBasicConfig = new Keke_witkey_basic_config_class();
    $objBasicConfig->setWhere("k = 'sitecss'");
    $objBasicConfig->setV(kekezu::k_input($css));
    $res = $objBasicConfig->edit_keke_witkey_basic_config();
    $_SESSION['showcolor'] = strval($color);
    if ($res) {
        kekezu::echojson('', 1, '');
    }
}
die;
示例#7
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$config_basic_obj = new Keke_witkey_basic_config_class();
$config_basic_arr = $config_basic_obj->query_keke_witkey_basic_config();
foreach ($config_basic_arr as $k => $v) {
    $config_arr[$v['k']] = $v['v'];
}
$url = 'index.php?do=config&view=rss';
if (isset($submit)) {
    $_POST['rss_choice_task'] = isset($_POST['rss_choice_task']) ? '1' : '0';
    $_POST['rss_choice_news'] = isset($_POST['rss_choice_news']) ? '1' : '0';
    foreach ($_POST as $k => $v) {
        $config_basic_obj->setWhere("k = '{$k}'");
        $config_basic_obj->setV($v);
        $res += $config_basic_obj->edit_keke_witkey_basic_config();
    }
    $config_basic_obj->setWhere("k = 'rss_star_date'");
    $config_basic_obj->setV(time());
    $config_basic_obj->edit_keke_witkey_basic_config();
    $kekezu->_cache_obj->gc();
    $kekezu->_cache_obj->set("keke_witkey_basic_config", $config_basic_arr);
    if ($res) {
        kekezu::admin_show_msg('操作成功!', $url, 3, '', 'success');
    } else {
        kekezu::admin_show_msg('操作失败!', $url, 3, '', 'fail');
    }
}
if (isset($vi)) {
    $objRss = new keke_rss_class();
    $objRss->title = $kekezu->_sys_config['rss_title'];
示例#8
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(63);
$oauth_type_list = keke_glob_class::get_open_api();
$config_basic_obj = new Keke_witkey_basic_config_class();
$config_arr = $kekezu->_weibo_list;
$api_open = $kekezu->_api_open;
$url = 'index.php?do=msg&view=weibo';
if (isset($submit)) {
    foreach ($conf as $k => $v) {
        $config_basic_obj->setWhere("k = '{$k}'");
        $config_basic_obj->setV($v);
        $res .= $config_basic_obj->edit_keke_witkey_basic_config();
    }
    !empty($api) and $oauth_api = $api or $oauth_api = array();
    $config_basic_obj->setWhere("k = 'oauth_api_open'");
    $config_basic_obj->setV(serialize($oauth_api));
    $config_basic_obj->edit_keke_witkey_basic_config();
    kekezu::admin_system_log($_lang['config_interface_log']);
    if ($res) {
        $kekezu->_cache_obj->del("keke_b3c58336");
        kekezu::admin_show_msg($_lang['oauth_api_config_success'], $url, 3, '', 'success');
    }
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
            }
            $postdata = "m=app&a=add&ucfounder=&ucfounderpw=" . urlencode($ucfounderpw) . "&apptype=" . urlencode($app_type) . "&appname=" . urlencode($app_name) . "&appurl=" . urlencode($app_url) . "&appip=&appcharset=" . CHARSET . '&appdbcharset=' . DBCHARSET . '&' . $app_tagtemplates . '&release=' . UC_CLIENT_RELEASE;
            $ucconfig = uc_fopen($ucapi . '/index.php', 500, $postdata, '', 1, $ucip);
            if (empty($ucconfig)) {
                kekezu::admin_show_msg($_lang['uc_app_fail_to_add'], 'index.php?do=config&view=integration&type=uc', '', 3, 'warning');
            } elseif ($ucconfig == '-1') {
                kekezu::admin_show_msg($_lang['uc_error_author_password'], 'index.php?do=config&view=integration&type=uc', 3, '', 'warning');
            } else {
                list($appauthkey, $appid) = explode('|', $ucconfig);
                if (empty($appauthkey) || empty($appid)) {
                    kekezu::admin_system_log($_lang['add_log_msg']);
                    kekezu::admin_show_msg(keke::lang('uc_app_invalid_to_add'), 'index.php?do=config&view=integration&type=uc', 3, '', 'success');
                }
            }
        }
        $ucconfig_info = explode('|', $ucconfig);
        $config_ucenter = keke_tpl_class::sreadfile(S_ROOT . "/config/config_ucenter.php");
        $config_ucenter = preg_replace("/define\\('UC_KEY',\\s*'.*?'\\);/s", "define('UC_KEY', '" . $ucconfig_info['0'] . "');", $config_ucenter);
        $config_ucenter = preg_replace("/define\\('UC_APPID',\\s*'*.*?'*\\);/s", "define('UC_APPID', " . $ucconfig_info[1] . ");", $config_ucenter);
        keke_tpl_class::swritefile(S_ROOT . "/config/config_ucenter.php", $config_ucenter);
        $config_obj->setWhere(" k = 'user_intergration'");
        $config_obj->setV(2);
        $config_obj->edit_keke_witkey_basic_config();
        $kekezu->_cache_obj->gc();
        kekezu::admin_system_log($_lang['uc_integrate_log']);
        kekezu::admin_show_msg($_lang['uc_integrate_success'], "index.php?do=config&view=integration", 2, '', 'success');
    }
    require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view . '_uc');
    die;
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view);