コード例 #1
0
ファイル: ucset.php プロジェクト: adi00/wumaproject
    ${'ifcheck_' . intval($uc_server)} = 'checked';
    include PrintEot('ucset');
    exit;
} else {
    InitGP(array('uc_server'), 'P', 2);
    setConfig('uc_server', $uc_server);
    if ($uc_server) {
        InitGP(array('uc_appid', 'uc_key'));
        if ($uc_server == '1') {
            $uc_appid = 1;
            !$uc_key && ($uc_key = randstr(20));
            $db->update("UPDATE pw_ucapp SET uc='0'");
            $db->pw_update("SELECT * FROM pw_ucapp WHERE id=" . pwEscape($uc_appid), "UPDATE pw_ucapp SET secretkey=" . pwEscape($uc_key) . ",uc='1' WHERE id=" . pwEscape($uc_appid), "INSERT INTO pw_ucapp SET " . pwSqlSingle(array('id' => $uc_appid, 'name' => $db_bbsname, 'siteurl' => $db_bbsurl, 'secretkey' => $uc_key, 'uc' => 1)));
            require_once R_P . 'uc_client/class_core.php';
            $uc = new UC();
            $myApp = $uc->load('app');
            $myApp->checkColumns();
        } elseif ($uc_server == '2') {
            InitGP(array('uc_dbhost', 'uc_dbuser', 'uc_dbpw', 'uc_dbname', 'uc_dbpre', 'uc_dbcharset'));
            $uc_appid = intval($uc_appid);
            (!$uc_appid || $uc_appid < 2) && ($uc_appid = 2);
            setConfig('uc_dbhost', $uc_dbhost);
            setConfig('uc_dbuser', $uc_dbuser);
            setConfig('uc_dbpw', $uc_dbpw);
            setConfig('uc_dbname', $uc_dbname);
            setConfig('uc_dbpre', $uc_dbpre);
            setConfig('uc_dbcharset', $uc_dbcharset);
        }
    }
    setConfig('uc_appid', $uc_appid);
    setConfig('uc_key', $uc_key);
コード例 #2
0
ファイル: ucnotify.php プロジェクト: jechiy/PHPWind
        $myApp = $uc->load('app');
        $applist = $myApp->applist();
        $page < 1 && ($page = 1);
        $total = $db->get_one("SELECT COUNT(*) AS sum FROM pw_ucsyncredit");
        $limit = S::sqlLimit($page - 1, 20);
        $creditdb = array();
        $query = $db->query("SELECT u.*,m.username FROM pw_ucsyncredit u LEFT JOIN pw_members m ON u.uid=m.uid {$limit}");
        while ($rt = $db->fetch_array($query)) {
            $creditdb[] = $rt;
        }
        include PrintEot('ucnotify');
        exit;
    } else {
        S::gp(array('selid'));
        $basename .= '&action=syncredit';
        if ($selid) {
            $db->update("DELETE FROM pw_ucsyncredit WHERE uid IN(" . S::sqlImplode($selid) . ')');
        }
        adminmsg('operate_success');
    }
} elseif ($action == 'synupdate') {
    S::gp(array('uid', 'appid'));
    if ($uid && $appid) {
        require_once R_P . 'uc_client/class_core.php';
        $uc = new UC();
        $myCredit = $uc->load('credit');
        $myCredit->synupdate($appid, array($uid));
    }
    $basename .= '&action=syncredit';
    adminmsg('operate_success');
}
コード例 #3
0
ファイル: uccredit.php プロジェクト: jechiy/PHPWind
<?php

!function_exists('adminmsg') && exit('Forbidden');
if ($uc_server != 1) {
    $db_adminrecord = 0;
    $basename = "javascript:parent.closeAdminTab(window);";
    adminmsg('uc_server_set');
}
require_once R_P . 'uc_client/class_core.php';
$uc = new UC();
$credittype = pwCreditNames();
if (empty($action)) {
    $ucApp = $uc->load('app');
    $applist = $ucApp->applist();
    include PrintEot('uccredit');
    exit;
} elseif ($action == 'create') {
    $ucApp = $uc->load('app');
    $applist = $ucApp->applist();
    if (empty($_POST['step'])) {
        $setv = '';
        include PrintEot('uccredit');
        exit;
    } else {
        S::gp(array('cid', 'ctype'));
        $basename .= '&action=create';
        if (!$cid || !isset($credittype[$cid])) {
            adminmsg('uc_cname_empty');
        }
        !$uc_syncredit && ($uc_syncredit = array());
        if (isset($uc_syncredit[$cid])) {