Ejemplo n.º 1
0
<?php

if (cfr('EMPLOYEE')) {
    if (isset($_GET['username'])) {
        $username = $_GET['username'];
        if (isset($_POST['addjob'])) {
            $date = $_POST['jobdate'];
            $worker_id = $_POST['worker'];
            $jobtype_id = $_POST['jobtype'];
            $job_notes = $_POST['notes'];
            stg_add_new_job($username, $date, $worker_id, $jobtype_id, $job_notes);
            rcms_redirect("?module=jobs&username="******"?module=jobs&username=" . $username);
        }
        stg_show_jobs($username);
        show_window('', web_UserControls($username));
    }
} else {
    show_error(__('Access denied'));
}
?>


Ejemplo n.º 2
0
<?php

if (cfr('DOWN')) {
    if (isset($_GET['username'])) {
        $login = vf($_GET['username']);
        // change down  if need
        if (isset($_POST['newdown'])) {
            $down = $_POST['newdown'];
            $billing->setdown($login, $down);
            log_register('CHANGE Down (' . $login . ') ON ' . $down);
            rcms_redirect("?module=downedit&username=" . $login);
        }
        $current_down = zb_UserGetStargazerData($login);
        $current_down = $current_down['Down'];
        $useraddress = zb_UserGetFullAddress($login) . ' (' . $login . ')';
        // Edit form construct
        $fieldname = __('Current Down state');
        $fieldkey = 'newdown';
        $form = web_EditorTrigerDataForm($fieldname, $fieldkey, $useraddress, $current_down);
        $form .= web_UserControls($login);
        // show form
        show_window(__('Edit Down'), $form);
    }
} else {
    show_error(__('You cant control this module'));
}
Ejemplo n.º 3
0
                 show_window(__('Available corps'), $corps->{$beggar}['METH']['RENDER']());
             }
         }
     }
 }
 //user management
 if ($route == Corps::URL_USER) {
     if (wf_CheckGet(array('username'))) {
         $login = mysql_real_escape_string($_GET['username']);
         $userCorpCheck = $corps->userIsCorporate($login);
         if ($userCorpCheck) {
             //enterprise user
             $corpsControls = $corps->corpPreview($userCorpCheck);
             $corpsControls .= wf_Link(Corps::URL_CORPS_EDIT . $userCorpCheck . '&usercallback=' . $login, web_edit_icon() . ' ' . __('Edit'), true, 'ubButton');
             $corpsControls .= wf_delimiter();
             $corpsControls .= web_UserControls($login);
             show_window(__('Corporate user'), $corpsControls);
         } else {
             //user is private
             if (wf_CheckPost(array('bindsomelogin', 'bindlogintocorpid'))) {
                 $corps->userBind($_POST['bindsomelogin'], $_POST['bindlogintocorpid']);
                 rcms_redirect(Corps::URL_USER_MANAGE . $_POST['bindsomelogin']);
             }
             if (method_exists($corps, $beggar['BU']['F'])) {
                 $corpAttachControls = $corps->{$beggar}['BU']['F']($login);
                 show_window(__('Private user'), $corpAttachControls);
             }
             if (method_exists($corps, $beggar['BU']['AB'])) {
                 $corpAddAttachControls = $corps->{$beggar}['BU']['AB']($login);
                 show_window(__('Create') . ' ' . __('Corporate user'), $corpAddAttachControls);
             }
Ejemplo n.º 4
0
 /**
  * Returns nethost option modify form
  * 
  * @param $allLeases - all available leases parsed from log
  * @param $login - user`s  login 
  * 
  * @return string
  */
 function web_opt82_ShowForm($allLeases, $login)
 {
     $result = '';
     $currentData = opt82_GetCurrentOptions($login);
     $cells = wf_TableCell(__('IP'));
     $cells .= wf_TableCell($currentData['hostip']);
     $rows = wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Remote-ID'));
     $cells .= wf_TableCell($currentData['remoteid']);
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Circuit-ID'));
     $cells .= wf_TableCell($currentData['circuitid']);
     $rows .= wf_TableRow($cells, 'row3');
     $currentTable = wf_TableBody($rows, '30%', '0', '');
     $result .= $currentTable;
     $result .= wf_delimiter();
     $inputs = wf_Selector('newopt82', $allLeases, __('New DHCP option 82'), '', true);
     $inputs .= wf_HiddenInput('edithostid', $currentData['hostid']);
     $inputs .= wf_HiddenInput('edithostip', $currentData['hostip']);
     $inputs .= wf_CheckInput('setrandomopt82', __('Set random'), true, false);
     $inputs .= wf_Submit(__('Save'));
     $form = wf_Form('', 'POST', $inputs, 'glamour');
     $result .= $form;
     $result .= wf_delimiter();
     $result .= web_UserControls($login);
     return $result;
 }
Ejemplo n.º 5
0
                    <td>' . __('Text') . '</td>
                    </tr>
                    ';
        if (!empty($allmessages)) {
            foreach ($allmessages as $io => $eachmessage) {
                $result .= '
                    <tr class="row3">
                    <td>' . $eachmessage['date'] . '</td>
                    <td>' . $eachmessage['text'] . '</td>
                    </tr>
                    ';
            }
        }
        $result .= '</table>';
        show_window(__('Previous messages'), $result);
    }
    if (isset($_GET['username'])) {
        $login = $_GET['username'];
        web_MessagesShowPrevious($login);
        if (isset($_POST['messagetext'])) {
            zb_TicketCreate('NULL', $login, $_POST['messagetext'], 'NULL', whoami());
            $newid = simple_get_lastid('ticketing');
            zb_TicketSetDone($newid);
            rcms_redirect("?module=pl_sendmessage&username=" . $login);
        }
        web_MessageSendForm();
        show_window('', web_UserControls($login));
    }
} else {
    show_error(__('You cant control this module'));
}
Ejemplo n.º 6
0
 $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);
 $cashinputs .= wf_TextInput('newpaymentnote', 'Payment note', '', true, 35);
 $cashinputs .= '<br>';
 $cashinputs .= wf_Submit('Add cash');
 $cashform = wf_Form('', 'POST', $cashinputs, 'glamour');
 show_window(__('Add cash'), $cashform);
 show_window('', web_UserControls($parent_login));
 //if someone adds cash
 if (wf_CheckPost(array('newcash'))) {
     $operation = vf($_POST['operation']);
     $cashtype = vf($_POST['cashtype']);
     $cash = $_POST['newcash'];
     if (isset($_POST['newpaymentnote'])) {
         $note = mysql_real_escape_string($_POST['newpaymentnote']);
     }
     //add cash to parent user
     zb_CashAdd($parent_login, $cash, $operation, $cashtype, $note);
     // add cash to all child users
     if (!empty($allchildusers)) {
         foreach ($allchildusers as $eachchild) {
             //adding cash
             if ($operation == 'add') {
Ejemplo n.º 7
0
                $documents->deleteTemplate($_GET['deletetemplate']);
                rcms_redirect('?module=pl_documents&username='******'Available document templates'), $documents->renderTemplatesList());
            //uploading new templates
            $uploadControl = wf_modal(__('Upload template'), __('Upload template'), $documents->uploadForm(), 'ubButton', '600', '300');
            show_window(__('Settings'), $uploadControl);
            //template upload subroutine
            if (wf_CheckPost(array('uploadtemplate'))) {
                $documents->doUpload();
                rcms_redirect('?module=pl_documents&username='******'Previously generated documents for this user'), $documents->renderUserDocuments());
        }
        //existing document downloading
        if (wf_CheckGet(array('documentdownload'))) {
            zb_DownloadFile($documents::DOCUMENTS_PATH . $_GET['documentdownload'], 'docx');
        }
        //document deletion from database
        if (wf_CheckGet(array('deletedocument'))) {
            $documents->unregisterDocument($_GET['deletedocument']);
            rcms_redirect('?module=pl_documents&username='******'', web_UserControls($documents->getLogin()));
    }
} else {
    show_error(__('You cant control this module'));
}
Ejemplo n.º 8
0
 /**
  * Renders ONU assigning form
  * 
  * @param string $login
  * @return string
  */
 public function onuAssignForm($login)
 {
     $result = '';
     $params = array();
     $allRealnames = zb_UserGetAllRealnames();
     $allAddress = zb_AddressGetFulladdresslistCached();
     @($userAddress = $allAddress[$login]);
     @($userRealname = $allRealnames[$login]);
     if (!empty($this->allOnu)) {
         foreach ($this->allOnu as $io => $each) {
             if (empty($each['login'])) {
                 $onuLabel = empty($each['ip']) ? $each['mac'] : $each['mac'] . ' - ' . $each['ip'];
                 $params[$each['id']] = $onuLabel;
             }
         }
     }
     //user data
     $cells = wf_TableCell(__('Real Name'), '30%', 'row2');
     $cells .= wf_TableCell($userRealname);
     $rows = wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Full address'), '30%', 'row2');
     $cells .= wf_TableCell($userAddress);
     $rows .= wf_TableRow($cells, 'row3');
     $result .= wf_TableBody($rows, '100%', 0, '');
     $result .= wf_delimiter();
     $inputs = wf_HiddenInput('assignonulogin', $login);
     $inputs .= wf_Selector('assignonuid', $params, __('ONU'), '', false);
     $inputs .= wf_Submit(__('Save'));
     $result .= wf_Form('', 'POST', $inputs, 'glamour');
     $result .= wf_CleanDiv();
     $result .= wf_delimiter();
     $result .= web_UserControls($login);
     return $result;
 }
Ejemplo n.º 9
0
 function web_plchecker($login)
 {
     $login = vf($login);
     $result = '<table width="100%" border="0">';
     $emails = zb_plcheckfield('emails', $login);
     $contracts = zb_plcheckfield('contracts', $login);
     $phones = zb_plcheckfield('phones', $login);
     $realname = zb_plcheckfield('realname', $login);
     $userspeeds = zb_plcheckfield('userspeeds', $login);
     $nethosts = zb_plchecknethost($login);
     $result .= '
         <tr class="row1">
             <td>' . __('Current value') . '</td>
             <td>' . __('Parameter') . '</td>
             <td>' . __('Actions') . '</td>
         <tr>
          ';
     $result .= '
         <tr class="row3">
             <td>' . web_bool_led($emails) . '</td>
             <td>' . __('Email') . '</td>
             <td>' . web_plfixerform($login, 'emails', $emails) . '</td>
         </tr>
          <tr class="row3">
             <td>' . web_bool_led($contracts) . '</td>
             <td>' . __('Contract') . '</td>
             <td>' . web_plfixerform($login, 'contracts', $contracts) . '</td>
          </tr>
             <tr class="row3">
             <td>' . web_bool_led($phones) . '</td>
             <td>' . __('Phone') . '/' . __('Mobile') . '</td>
             <td>' . web_plfixerform($login, 'phones', $phones) . '</td>
         </tr>
         <tr class="row3">
             <td>' . web_bool_led($realname) . '</td>
             <td>' . __('Real Name') . '</td>
             <td>' . web_plfixerform($login, 'realname', $realname) . '</td>
         </tr>
         <tr class="row3">
             <td>' . web_bool_led($userspeeds) . '</td>
             <td>' . __('Speed override') . '</td>
             <td>' . web_plfixerform($login, 'userspeeds', $userspeeds) . '</td>
         </tr>
         <tr class="row3">
             <td>' . web_bool_led($nethosts) . '</td>
             <td>' . __('Network') . '</td>
             <td>' . web_plfixerform($login, 'nethosts', $nethosts) . '</td>
         </tr>
         ';
     $result .= '</table>';
     $result .= web_UserControls($login);
     return $result;
 }
Ejemplo n.º 10
0
 /**
  * Returns custom module backlinks for some scopes
  * 
  * @return string
  */
 protected function backUrlHelper()
 {
     $result = '';
     if ($this->scope == 'USERPROFILE') {
         $result = web_UserControls($this->itemId);
     }
     if ($this->scope == 'CUSTMAPSITEMS') {
         $result = wf_Link('?module=custmaps&edititem=' . $this->itemId, __('Back'), false, 'ubButton');
     }
     if ($this->scope == 'WAREHOUSEITEMTYPE') {
         $result = wf_Link('?module=warehouse&itemtypes=true', __('Back'), false, 'ubButton');
     }
     if ($this->scope == 'TASKMAN') {
         $result = wf_Link('?module=taskman&edittask=' . $this->itemId, __('Back'), false, 'ubButton');
     }
     return $result;
 }
Ejemplo n.º 11
0
<?php

if (cfr('TRAFFSTATS')) {
    if (isset($_GET['username'])) {
        $login = vf($_GET['username']);
        $useraddress = zb_UserGetFullAddress($login);
        show_window(__('Traffic stats') . ' ' . $useraddress . ' (' . $login . ')', web_UserTraffStats($login) . web_UserControls($login));
    }
} else {
    show_error(__('Access denied'));
}
Ejemplo n.º 12
0
 function web_UserEditShowForm($login)
 {
     global $ubillingConfig;
     $alter_conf = $ubillingConfig->getAlter();
     $stgdata = zb_UserGetStargazerData($login);
     $address = zb_UserGetFullAddress($login);
     $realname = zb_UserGetRealName($login);
     $phone = zb_UserGetPhone($login);
     $contract = zb_UserGetContract($login);
     $mobile = zb_UserGetMobile($login);
     $mail = zb_UserGetEmail($login);
     $notes = zb_UserGetNotes($login);
     $ip = $stgdata['IP'];
     $mac = zb_MultinetGetMAC($stgdata['IP']);
     $speedoverride = zb_UserGetSpeedOverride($login);
     $tariff = $stgdata['Tariff'];
     $credit = $stgdata['Credit'];
     $cash = $stgdata['Cash'];
     $password = $stgdata['Password'];
     $aonline = $stgdata['AlwaysOnline'];
     $dstatdisable = $stgdata['DisabledDetailStat'];
     $passive = $stgdata['Passive'];
     $down = $stgdata['Down'];
     $creditexpire = $stgdata['CreditExpire'];
     if ($alter_conf['PASSWORDSHIDE']) {
         $password = __('Hidden');
     }
     if ($speedoverride == '0') {
         $speedoverride = __('No');
     }
     if ($creditexpire > 0) {
         $creditexpire = date("Y-m-d", $creditexpire);
     } else {
         $creditexpire = __('No');
     }
     $cells = wf_TableCell(__('Parameter'));
     $cells .= wf_TableCell(__('Current value'));
     $cells .= wf_TableCell(__('Actions'));
     $rows = wf_TableRow($cells, 'row2');
     //express card
     if ($alter_conf['CRM_MODE']) {
         $cells = wf_TableCell(__('Express card'));
         $cells .= wf_TableCell('');
         $cells .= wf_TableCell(wf_Link('?module=expresscard&username='******'skins/express.gif') . ' ' . __('Edit')));
         $rows .= wf_TableRow($cells, 'row3');
     }
     //default fields editing
     $cells = wf_TableCell(__('Full address'));
     $cells .= wf_TableCell($address);
     $cells .= wf_TableCell(wf_Link('?module=binder&username='******'skins/icon_build.gif') . ' ' . __('Occupancy')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Password'));
     $cells .= wf_TableCell($password);
     $cells .= wf_TableCell(wf_Link('?module=passwordedit&username='******'skins/icon_key.gif') . ' ' . __('Change') . ' ' . __('password')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Real Name'));
     $cells .= wf_TableCell($realname);
     $cells .= wf_TableCell(wf_Link('?module=realnameedit&username='******'skins/icon_user.gif') . ' ' . __('Change') . ' ' . __('Real Name')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Phone'));
     $cells .= wf_TableCell($phone);
     $cells .= wf_TableCell(wf_Link('?module=phoneedit&username='******'skins/icon_phone.gif') . ' ' . __('Change') . ' ' . __('phone')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Mobile'));
     $cells .= wf_TableCell($mobile);
     $cells .= wf_TableCell(wf_Link('?module=mobileedit&username='******'skins/icon_mobile.gif') . ' ' . __('Change') . ' ' . __('mobile')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Contract'));
     $cells .= wf_TableCell($contract);
     $cells .= wf_TableCell(wf_Link('?module=contractedit&username='******'skins/icon_link.gif') . ' ' . __('Change') . ' ' . __('contract')));
     $rows .= wf_TableRow($cells, 'row3');
     if ($alter_conf['CORPS_ENABLED']) {
         $greed = new Avarice();
         $corpsRuntime = $greed->runtime('CORPS');
         if (!empty($corpsRuntime)) {
             $corps = new Corps();
             $corpsCheck = $corps->userIsCorporate($login);
             $cells = wf_TableCell(__('User type'));
             if (cfr('CORPS')) {
                 $corpControls = wf_Link(Corps::URL_USER_MANAGE . $login, wf_img('skins/corporate_small.gif') . ' ' . __('Change') . ' ' . __('user type'));
             } else {
                 $corpControls = '';
             }
             if ($corpsCheck) {
                 $cells .= wf_TableCell(__('Corporate user'));
                 $cells .= wf_TableCell($corpControls);
             } else {
                 $cells .= wf_TableCell(__('Private user'));
                 $cells .= wf_TableCell($corpControls);
             }
             $rows .= wf_TableRow($cells, 'row3');
         }
     }
     $cells = wf_TableCell(__('Email'));
     $cells .= wf_TableCell($mail);
     $cells .= wf_TableCell(wf_Link('?module=mailedit&username='******'skins/icon_mail.gif') . ' ' . __('Change') . ' ' . __('email')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Tariff'));
     $cells .= wf_TableCell($tariff);
     $cells .= wf_TableCell(wf_Link('?module=tariffedit&username='******'skins/icon_tariff.gif') . ' ' . __('Change') . ' ' . __('tariff')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Speed override'));
     $cells .= wf_TableCell($speedoverride);
     $cells .= wf_TableCell(wf_Link('?module=speededit&username='******'skins/icon_speed.gif') . ' ' . __('Change') . ' ' . __('speed override')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Credit'));
     $cells .= wf_TableCell($credit);
     $cells .= wf_TableCell(wf_Link('?module=creditedit&username='******'skins/icon_credit.gif') . ' ' . __('Change') . ' ' . __('credit limit')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Credit expire'));
     $cells .= wf_TableCell($creditexpire);
     $cells .= wf_TableCell(wf_Link('?module=creditexpireedit&username='******'skins/icon_calendar.gif') . ' ' . __('Change') . ' ' . __('credit expire date')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Balance'));
     $cells .= wf_TableCell($cash);
     $cells .= wf_TableCell(wf_Link('?module=addcash&username='******'#profileending', wf_img('skins/icon_dollar.gif') . ' ' . __('Finance operations')));
     $rows .= wf_TableRow($cells, 'row3');
     if (isset($alter_conf['SIGNUP_PAYMENTS']) && !empty($alter_conf['SIGNUP_PAYMENTS'])) {
         $payment = zb_UserGetSignupPrice($login);
         $paid = zb_UserGetSignupPricePaid($login);
         if ($payment != $paid && $payment > 0) {
             $cells = wf_TableCell(__('Signup paid'));
             $cells .= wf_TableCell(zb_UserGetSignupPricePaid($login) . '/' . zb_UserGetSignupPrice($login));
             $cells .= wf_TableCell(wf_Link('?module=signupprices&username='******'skins/icons/register.png', __('Edit signup price')) . ' ' . __('Edit signup price')));
             $rows .= wf_TableRow($cells, 'row3');
         }
     }
     $cells = wf_TableCell(__('IP'));
     $cells .= wf_TableCell($ip);
     $cells .= wf_TableCell(wf_Link('?module=pl_ipchange&username='******'skins/icon_ip.gif') . ' ' . __('Change') . ' ' . __('IP')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('MAC'));
     $cells .= wf_TableCell($mac);
     $cells .= wf_TableCell(wf_Link('?module=macedit&username='******'skins/icon_ether.gif') . ' ' . __('Change') . ' ' . __('MAC')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('AlwaysOnline'));
     $cells .= wf_TableCell(web_trigger($aonline));
     $cells .= wf_TableCell(wf_Link('?module=aoedit&username='******'skins/icon_online.gif') . ' ' . __('AlwaysOnline')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Disable detailed stats'));
     $cells .= wf_TableCell(web_trigger($dstatdisable));
     $cells .= wf_TableCell(wf_Link('?module=dstatedit&username='******'skins/icon_stats.gif') . ' ' . __('Disable detailed stats')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('User passive'));
     $cells .= wf_TableCell(web_trigger($passive));
     $cells .= wf_TableCell(wf_Link('?module=passiveedit&username='******'skins/icon_passive.gif') . ' ' . __('User passive')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('User down'));
     $cells .= wf_TableCell(web_trigger($down));
     $cells .= wf_TableCell(wf_Link('?module=downedit&username='******'skins/icon_down.gif') . ' ' . __('User down')));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Passport data'));
     $cells .= wf_TableCell('');
     $cells .= wf_TableCell(wf_Link('?module=pdataedit&username='******'skins/icon_passport.gif') . ' ' . __('Change') . ' ' . __('passport data')));
     $rows .= wf_TableRow($cells, 'row3');
     if ($alter_conf['CONDET_ENABLED']) {
         $conDet = new ConnectionDetails();
         $cells = wf_TableCell(__('Connection details'));
         $cells .= wf_TableCell($conDet->renderData($login));
         $cells .= wf_TableCell(wf_Link('?module=condetedit&username='******'skins/cableseal_small.png') . ' ' . __('Change') . ' ' . __('Connection details')));
         $rows .= wf_TableRow($cells, 'row3');
     }
     //additional comments indication
     if ($alter_conf['ADCOMMENTS_ENABLED']) {
         $adcomments = new ADcomments('USERNOTES');
         $indicatorIcon = ' ' . wf_Link('?module=notesedit&username='******'');
     } else {
         $indicatorIcon = '';
     }
     $cells = wf_TableCell(__('Notes'));
     $cells .= wf_TableCell($notes . $indicatorIcon);
     $cells .= wf_TableCell(wf_Link('?module=notesedit&username='******'skins/icon_note.gif') . ' ' . __('Notes')));
     $rows .= wf_TableRow($cells, 'row3');
     $form = wf_TableBody($rows, '100%', '0');
     show_window(__('Edit user') . ' ' . $address, $form);
     cf_FieldEditor($login);
     show_window('', web_UserControls($login));
 }
Ejemplo n.º 13
0
        $form = web_GrepLogByUser($login, $searchType);
        //raw database fields display
        if (cfr('ROOT')) {
            $userdata_q = "SELECT * from `users` WHERE `login`='" . $login . "'";
            $userdataraw = simple_query($userdata_q);
            if (!empty($userdataraw)) {
                $userdump = print_r($userdataraw, true);
                $userdump = nl2br($userdump);
                $form .= wf_modal(__('User inside'), __('User inside'), $userdump, 'ubButton', '800', '600') . ' &nbsp;';
                //nethosts data
                $userip = $userdataraw['IP'];
                $nethost_q = "SELECT * from `nethosts` WHERE `ip`='" . $userip . "'";
                $nethostraw = simple_queryall($nethost_q);
                if (!empty($nethostraw)) {
                    $nethostdump = print_r($nethostraw, true);
                    $nethostdump = wf_tag('pre') . $nethostdump . wf_tag('pre', true);
                    $form .= wf_modal(__('User Networking'), __('User Networking'), $nethostdump, 'ubButton', '400', '400');
                }
            }
        }
        if (wf_CheckGet(array('strict'))) {
            $form .= wf_Link('?module=lifestory&username='******'Normal search'), false, 'ubButton');
        } else {
            $form .= wf_Link('?module=lifestory&username='******'&strict=true', __('Strict search'), false, 'ubButton');
        }
        $form .= wf_delimiter() . web_UserControls($login);
        show_window(__('User lifestory'), $form);
    }
} else {
    show_error(__('You cant control this module'));
}
Ejemplo n.º 14
0
 /**
  * returns user unbind form
  * 
  * @param $login string Existing user login
  * 
  * @return string
  */
 public function userUnbindForm($login)
 {
     $login = mysql_real_escape_string($login);
     $result = '';
     if (isset($this->users[$login])) {
         $inputs = wf_HiddenInput('corpsunbindlogin', $login);
         $inputs .= wf_CheckInput('unbindagree', __('I am quite sure that I was going to do'), false, false);
         $inputs .= wf_Submit(__('Destroy user link'));
         $result = wf_Form("", 'POST', $inputs, 'glamour');
         $result .= wf_delimiter();
         $result .= web_UserControls($login);
     } else {
         $result = __('Not existing item');
     }
     return $result;
 }