コード例 #1
0
ファイル: index.php プロジェクト: l1ght13aby/Ubilling
<?php

if (cfr('USERPROFILE')) {
    if (isset($_GET['username'])) {
        $login = vf($_GET['username']);
        $login = trim($login);
        try {
            $profile = new UserProfile($login);
            show_window(__('User profile'), $profile->render());
        } catch (Exception $exception) {
            show_window(__('Error'), __('Strange exeption') . ': ' . wf_tag('pre') . $exception->getMessage() . wf_tag('pre', true));
        }
    } else {
        throw new Exception('GET_NO_USERNAME');
    }
}
コード例 #2
0
ファイル: index.php プロジェクト: l1ght13aby/Ubilling
if (cfr('CORPORATE')) {
    // here we show parent user and his controls
    if (isset($_GET['userlink'])) {
        $userlink = $_GET['userlink'];
        $parent_login = cu_GetParentUserLogin($userlink);
        $childusers = cu_GetAllChildUsers($userlink);
        $group_controls = wf_Link('?module=corporate&userlink=' . $userlink . '&control=cash', 'Cash', false, 'ubButton');
        $group_controls .= wf_Link('?module=corporate&userlink=' . $userlink . '&control=tariff', 'Tariff', false, 'ubButton');
        $group_controls .= wf_Link('?module=corporate&userlink=' . $userlink . '&control=credit', 'Credit', false, 'ubButton');
        show_window(__('Group operations'), $group_controls);
        show_window(__('Linked users'), web_UserArrayShower($childusers));
        //show parent user profile by default
        if (!isset($_GET['control'])) {
            $profileObj = new UserProfile($parent_login);
            $default_profile = $profileObj->render();
            show_window(__('User profile'), $default_profile);
        } else {
            //show controls
            if ($_GET['control'] == 'cash') {
                //group cash operations
                $allchildusers = cu_GetAllChildUsers($userlink);
                //cash add form construct
                $cashtypes = zb_CashGetAllCashTypes();
                $cashinputs = wf_TextInput('newcash', 'New cash', '', true, 5);
                $cashinputs .= web_CashTypeSelector() . ' ' . __('Cash type');
                $cashinputs .= '<br>';
                $cashinputs .= wf_RadioInput('operation', 'Add cash', 'add', false, true);
                $cashinputs .= wf_RadioInput('operation', 'Correct saldo', 'correct', false, false);
                $cashinputs .= wf_RadioInput('operation', 'Mock payment', 'mock', false, false);
                $cashinputs .= wf_RadioInput('operation', 'Set cash', 'set', true, false);