Пример #1
0
function getOpts($user, $optlist)
{
    if ($user == false) {
        showIndex();
    }
    $flds = array('username' => $user, 'optlist' => $optlist);
    $msg = msgEncode('getopts', 'getopts', $flds, $user);
    $rep = sendsockreply('getOpts', $msg);
    if (!$rep) {
        dbdown();
    }
    return repDecode($rep);
}
Пример #2
0
    AuditAction($cfg["constants"]["admin"], " Updating TorrentFlux UI Settings");
    header("location: admin.php?op=uiSettings");
}
//****************************************************************************
//****************************************************************************
//****************************************************************************
//****************************************************************************
// TRAFFIC CONTROLER
$op = getRequestVar('op');
switch ($op) {
    default:
        $min = getRequestVar('min');
        if (empty($min)) {
            $min = 0;
        }
        showIndex($min);
        break;
    case "showUserActivity":
        $min = getRequestVar('min');
        if (empty($min)) {
            $min = 0;
        }
        $user_id = getRequestVar('user_id');
        $srchFile = getRequestVar('srchFile');
        $srchAction = getRequestVar('srchAction');
        showUserActivity($min, $user_id, $srchFile, $srchAction);
        break;
        //XFER
    //XFER
    case "xfer":
        DisplayHead(_XFER);
Пример #3
0
// modCookie -- edit a Cookie Host Information
//******************************************************************************
function modCookie($cid, $newCookie)
{
    global $cfg;
    modCookieInfo($cid, $newCookie);
    AuditAction($cfg["constants"]["admin"], "Modified Cookie: " . $newCookie["host"] . " | " . $newCookie["data"]);
    header("location: profile.php?op=showCookies");
}
//****************************************************************************
//****************************************************************************
// TRAFFIC CONTROLER
$op = getRequestVar('op');
switch ($op) {
    default:
        showIndex();
        exit;
        break;
        // update per user settings
    // update per user settings
    case "updateSettingsUser":
        updateSettingsUser();
        break;
    case "updateProfile":
        $pass1 = getRequestVar('pass1');
        $pass2 = getRequestVar('pass2');
        $hideOffline = getRequestVar('hideOffline');
        $theme = getRequestVar('theme');
        $language = getRequestVar('language');
        updateProfile($pass1, $pass2, $hideOffline, $theme, $language);
        break;
Пример #4
0
function eventCmd($user, $flds)
{
    if ($user == false) {
        showIndex();
    }
    $msg = msgEncode('events', 'events', $flds, $user);
    $rep = sendsockreply('eventCmd', $msg);
    if (!$rep) {
        dbdown();
    }
    return repDecode($rep);
}
Пример #5
0
                } else {
                    showError($smarty, '请正确归还车辆!', $db);
                }
                break;
            case 'returnIt':
                if (isset($_GET['s']) && isset($_POST['code'])) {
                    $stop = $db->getAllByID("tstop", $_GET['s']);
                    if (test_auth($stop['code'], $db, $_POST['code'])) {
                        showReturned($smarty, $userInfo, $db);
                    } else {
                        showError($smarty, '车站口令错误,请重试!', $db);
                    }
                } else {
                    showError($smarty, '请正确归还车辆!', $db);
                }
                break;
            case 'accident':
                showTip($smarty, "<p>请联系志愿者:</p><p>18964087795 - 费思量/18401654098 - 张立鹏</p><p>联系后,请仍然将车子归还到任意车站!</p><p>确定上报后,车辆会被标记为需要维修!</p><a class='ui-btn' href='main.php?a=confirmAccident&q=" . rand(1, 10000000) . "'>确定上报</a>", $db);
                break;
            case 'confirmAccident':
                $db->setAccident($userInfo['ID']);
                showTip($smarty, "<p>已经上报,请到车站归还车辆!</p><p>谢谢您的配合!</p><p>我们的志愿者会尽快联系到您!</p>", $db);
                break;
        }
        break;
    case 3:
        // disabled
        showIndex($smarty, $userInfo, $db);
        break;
}
$db->disconnect();