示例#1
0
/**
 * Render available tag types list with all needed controls
 * 
 * @return string
 */
function stg_show_tagtypes()
{
    $messages = new UbillingMessageHelper();
    $query = "SELECT * from `tagtypes` ORDER BY `id` ASC";
    $alltypes = simple_queryall($query);
    $cells = wf_TableCell(__('ID'));
    $cells .= wf_TableCell(__('Color'));
    $cells .= wf_TableCell(__('Priority'));
    $cells .= wf_TableCell(__('Text'));
    $cells .= wf_TableCell(__('Actions'));
    $rows = wf_TableRow($cells, 'row1');
    if (!empty($alltypes)) {
        foreach ($alltypes as $io => $eachtype) {
            $eachtagcolor = $eachtype['tagcolor'];
            $actions = wf_JSAlert('?module=usertags&delete=' . $eachtype['id'], web_delete_icon(), $messages->getDeleteAlert());
            $actions .= wf_JSAlert('?module=usertags&edit=' . $eachtype['id'], web_edit_icon(), $messages->getEditAlert());
            $cells = wf_TableCell($eachtype['id']);
            $cells .= wf_TableCell(wf_tag('font', false, '', 'color="' . $eachtagcolor . '"') . $eachtagcolor . wf_tag('font', true));
            $cells .= wf_TableCell($eachtype['tagsize']);
            $cells .= wf_TableCell($eachtype['tagname']);
            $cells .= wf_TableCell($actions);
            $rows .= wf_TableRow($cells, 'row3');
        }
    }
    $result = wf_TableBody($rows, '100%', 0, 'sortable');
    //construct adding form
    $inputs = wf_ColPicker('newcolor', __('Color'), '#' . rand(11, 99) . rand(11, 99) . rand(11, 99), false, '10');
    $inputs .= wf_TextInput('newtext', __('Text'), '', false, '15');
    $inputs .= web_priority_selector() . ' ';
    $inputs .= wf_HiddenInput('addnewtag', 'true');
    $inputs .= wf_Submit(__('Create'));
    $form = wf_Form("", 'POST', $inputs, 'glamour');
    $result .= $form;
    return $result;
}
示例#2
0
/**
 * Shows task editing/management form
 * 
 * @global object $ubillingConfig
 * @param int $taskid
 * 
 * @return void
 */
function ts_TaskChangeForm($taskid)
{
    global $ubillingConfig;
    $altercfg = $ubillingConfig->getAlter();
    $taskid = vf($taskid, 3);
    $taskdata = ts_GetTaskData($taskid);
    $result = '';
    $allemployee = ts_GetAllEmployee();
    $activeemployee = ts_GetActiveEmployee();
    $alljobtypes = ts_GetAllJobtypes();
    $messages = new UbillingMessageHelper();
    $smsData = '';
    if (!empty($taskdata)) {
        //not done task
        if (empty($taskdata['login'])) {
            $login_detected = ts_DetectUserByAddress($taskdata['address']);
            if ($login_detected) {
                $addresslink = wf_Link("?module=userprofile&username="******"?module=userprofile&username="******"H:i", strtotime($taskdata['starttime'])) : '';
                $smsJobNote = mysql_real_escape_string($taskdata['jobnote']);
                $smsEmployee = vf($taskdata['employee']);
                $newSmsText = $smsAddress . ' ' . $smsPhone . ' ' . $smsJobNote . $smsJobTime;
                $smsDataCells = wf_TableCell(__('Employee'), '', 'row2');
                $smsDataCells .= wf_TableCell(@$allemployee[$taskdata['employee']]);
                $smsDataRows = wf_TableRow($smsDataCells, 'row3');
                $smsDataCells = wf_TableCell(__('Message'), '', 'row2');
                $smsDataCells .= wf_TableCell(zb_TranslitString($newSmsText));
                $smsDataRows .= wf_TableRow($smsDataCells, 'row3');
                $smsDataTable = wf_TableBody($smsDataRows, '100%', '0', 'glamour');
                $smsInputs = $smsDataTable;
                $smsInputs .= wf_HiddenInput('postsendemployee', $smsEmployee);
                $smsInputs .= wf_HiddenInput('postsendsmstext', $newSmsText);
                $smsInputs .= wf_Submit(__('Send SMS'));
                $smsForm = wf_Form('', 'POST', $smsInputs, '');
                $smsData = wf_modal(wf_img_sized('skins/icon_mobile.gif', __('Send SMS'), '10'), __('Send SMS'), $smsForm, '', '400', '200');
            }
        }
        $tablecells = wf_TableCell(__('ID'), '30%');
        $tablecells .= wf_TableCell($taskdata['id']);
        $tablerows = wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Task creation date') . ' / ' . __('Administrator'));
        $tablecells .= wf_TableCell($taskdata['date'] . ' / ' . $taskdata['admin']);
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Target date'));
        $tablecells .= wf_TableCell(wf_tag('strong') . $taskdata['startdate'] . ' ' . $taskdata['starttime'] . wf_tag('strong', true));
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Task address'));
        $tablecells .= wf_TableCell($addresslink);
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Login'));
        $tablecells .= wf_TableCell($taskLogin . $loginType);
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Phone'));
        $tablecells .= wf_TableCell($taskdata['phone']);
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Job type'));
        $tablecells .= wf_TableCell(@$alljobtypes[$taskdata['jobtype']]);
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Who should do'));
        $tablecells .= wf_TableCell(@$allemployee[$taskdata['employee']] . ' ' . $smsData);
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $tablecells = wf_TableCell(__('Job note'));
        $tablecells .= wf_TableCell(nl2br($taskdata['jobnote']));
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $result .= wf_TableBody($tablerows, '100%', '0', 'glamour');
        $result .= wf_tag('div', false, '', 'style="clear:both;"') . wf_tag('div', true);
        // show task preview
        show_window(__('View task') . ' ' . $modform, $result);
        //Salary accounting
        if ($altercfg['SALARY_ENABLED']) {
            if (cfr('SALARYTASKSVIEW')) {
                $salary = new Salary();
                show_window(__('Additional jobs done'), $salary->taskJobCreateForm($_GET['edittask']));
            }
        }
        //warehouse integration
        if ($altercfg['WAREHOUSE_ENABLED']) {
            if (cfr('WAREHOUSE')) {
                $warehouse = new Warehouse();
                show_window(__('Additionally spent materials'), $warehouse->taskMaterialsReport($_GET['edittask']));
            }
        }
        //if task undone
        if ($taskdata['status'] == 0) {
            $sup = wf_tag('sup') . '*' . wf_tag('sup', false);
            $inputs = wf_HiddenInput('changetask', $taskid);
            $inputs .= wf_DatePicker('editenddate') . wf_tag('label', false) . __('Finish date') . $sup . wf_tag('label', true) . wf_tag('br');
            $inputs .= wf_tag('br');
            $inputs .= wf_Selector('editemployeedone', $activeemployee, __('Worker done'), $taskdata['employee'], true);
            $inputs .= wf_tag('br');
            $inputs .= wf_tag('label', false) . __('Finish note') . wf_tag('label', true) . wf_tag('br');
            $inputs .= wf_TextArea('editdonenote', '', '', true, '35x3');
            $inputs .= wf_tag('br');
            $inputs .= $jobgencheckbox;
            $inputs .= wf_Submit(__('This task is done'));
            $form = wf_Form("", 'POST', $inputs, 'glamour');
            if (cfr('TASKMANDELETE')) {
                show_window('', wf_JSAlertStyled('?module=taskman&deletetask=' . $taskid, web_delete_icon() . ' ' . __('Remove this task - it is an mistake'), $messages->getDeleteAlert(), 'ubButton'));
            }
            //show editing form
            if (cfr('TASKMANDONE')) {
                show_window(__('If task is done'), $form);
            }
        } else {
            $donecells = wf_TableCell(__('Finish date'), '30%');
            $donecells .= wf_TableCell($taskdata['enddate']);
            $donerows = wf_TableRow($donecells, 'row3');
            $donecells = wf_TableCell(__('Worker done'));
            $donecells .= wf_TableCell($allemployee[$taskdata['employeedone']]);
            $donerows .= wf_TableRow($donecells, 'row3');
            $donecells = wf_TableCell(__('Finish note'));
            $donecells .= wf_TableCell($taskdata['donenote']);
            $donerows .= wf_TableRow($donecells, 'row3');
            $doneresult = wf_TableBody($donerows, '100%', '0', 'glamour');
            if (cfr('TASKMANDELETE')) {
                $doneresult .= wf_JSAlertStyled('?module=taskman&deletetask=' . $taskid, web_delete_icon() . ' ' . __('Remove this task - it is an mistake'), $messages->getDeleteAlert(), 'ubButton');
            }
            if (cfr('TASKMANDONE')) {
                $doneresult .= ' ';
                $doneresult .= wf_JSAlertStyled('?module=taskman&setundone=' . $taskid, wf_img('skins/icon_key.gif') . ' ' . __('No work was done'), $messages->getEditAlert(), 'ubButton');
            }
            show_window(__('Task is done'), $doneresult);
        }
    }
}
示例#3
0
 /**
  * Renders available reports list
  * 
  * @return string
  */
 function web_ReportMasterShowReportsList()
 {
     $messages = new UbillingMessageHelper();
     $reports_path = DATA_PATH . "reports/";
     $allreports = rcms_scandir($reports_path);
     $cells = wf_TableCell(__('Report name'));
     $cells .= wf_TableCell(__('Actions'));
     $rows = wf_TableRow($cells, 'row1');
     if (!empty($allreports)) {
         foreach ($allreports as $eachreport) {
             $report_template = rcms_parse_ini_file($reports_path . $eachreport);
             $cells = wf_TableCell(wf_Link('?module=reportmaster&view=' . $eachreport, __($report_template['REPORT_NAME'])));
             $actControls = wf_JSAlert('?module=reportmaster&delete=' . $eachreport, web_delete_icon(), $messages->getDeleteAlert());
             $actControls .= wf_JSAlert('?module=reportmaster&edit=' . $eachreport, web_edit_icon(), $messages->getEditAlert());
             $cells .= wf_TableCell($actControls);
             $rows .= wf_TableRow($cells, 'row3');
         }
     }
     $result = wf_TableBody($rows, '100%', 0, 'sortable');
     return $result;
 }
示例#4
0
 /**
  * Returns available time rules grid
  * 
  * @return string
  */
 public function renderList()
 {
     $messages = new UbillingMessageHelper();
     $allTariffs = zb_TariffGetPricesAll();
     $query = "SELECT * from `dshape_time` ORDER BY `id` ASC";
     $allrules = simple_queryall($query);
     $cells = wf_TableCell(__('ID'));
     $cells .= wf_TableCell(__('Tariff'));
     $cells .= wf_TableCell(__('Time from'));
     $cells .= wf_TableCell(__('Time to'));
     $cells .= wf_TableCell(__('Speed'));
     $cells .= wf_TableCell(__('Actions'));
     $rows = wf_TableRow($cells, 'row1');
     if (!empty($allrules)) {
         foreach ($allrules as $io => $eachrule) {
             $rowClass = isset($allTariffs[$eachrule['tariff']]) ? 'row3' : 'sigdeleteduser';
             $tariffControl = cfr('TARIFFSPEED') ? wf_Link('?module=tariffspeeds&tariff=' . $eachrule['tariff'], $eachrule['tariff'], false) : $eachrule['tariff'];
             $cells = wf_TableCell($eachrule['id']);
             $cells .= wf_TableCell($tariffControl);
             $cells .= wf_TableCell($eachrule['threshold1']);
             $cells .= wf_TableCell($eachrule['threshold2']);
             $cells .= wf_TableCell($eachrule['speed']);
             $actions = wf_JSAlert('?module=dshaper&delete=' . $eachrule['id'], web_delete_icon(), $messages->getDeleteAlert());
             $actions .= wf_JSAlert('?module=dshaper&edit=' . $eachrule['id'], web_edit_icon(), $messages->getEditAlert());
             $cells .= wf_TableCell($actions);
             $rows .= wf_TableRow($cells, $rowClass);
         }
     }
     $result = wf_TableBody($rows, '100%', '0', 'sortable');
     return $result;
 }
示例#5
0
 /**
  * Returns list of duplicate coords/name items for some existing map
  * 
  * @param int $mapid
  * @return string
  */
 public function renderItemDuplicateList($mapid)
 {
     $mapid = vf($mapid, 3);
     $result = '';
     $messages = new UbillingMessageHelper();
     $itemsCount = 0;
     $filterArray = array();
     if ($this->altCfg['ADCOMMENTS_ENABLED']) {
         $adcomments = new ADcomments('CUSTMAPITEMS');
         $adc = true;
     } else {
         $adc = false;
     }
     //counting unique geo coords
     if (!empty($this->allItems)) {
         foreach ($this->allItems as $ia => $eachItem) {
             if ($eachItem['mapid'] == $mapid) {
                 if (isset($filterArray[$eachItem['geo']])) {
                     $filterArray[$eachItem['geo']]++;
                 } else {
                     $filterArray[$eachItem['geo']] = 1;
                 }
             }
         }
     }
     $result .= wf_Link('?module=custmaps&showitems=' . $mapid, __('Back'), false, 'ubButton');
     $result .= wf_delimiter();
     $cells = wf_TableCell(__('ID'));
     $cells .= wf_TableCell(__('Type'));
     $cells .= wf_TableCell(__('Geo location'));
     $cells .= wf_TableCell(__('Name'));
     $cells .= wf_TableCell(__('Location'));
     $cells .= wf_TableCell(__('Actions'));
     $rows = wf_TableRow($cells, 'row1');
     if (!empty($this->allItems)) {
         foreach ($this->allItems as $io => $each) {
             $indicator = $adc ? $adcomments->getCommentsIndicator($each['id']) : '';
             if ($each['mapid'] == $mapid) {
                 if (isset($filterArray[$each['geo']])) {
                     if ($filterArray[$each['geo']] > 1) {
                         $cells = wf_TableCell($each['id']);
                         $cells .= wf_TableCell($this->itemGetTypeName($each['type']));
                         $cells .= wf_TableCell($each['geo']);
                         $cells .= wf_TableCell($each['name']);
                         $cells .= wf_TableCell($each['location']);
                         $actLinks = '';
                         if (cfr('CUSTMAPEDIT')) {
                             $actLinks .= wf_JSAlertStyled('?module=custmaps&deleteitem=' . $each['id'], web_delete_icon(), $messages->getDeleteAlert()) . ' ';
                         }
                         $actLinks .= wf_JSAlertStyled('?module=custmaps&edititem=' . $each['id'], web_edit_icon(), $messages->getEditAlert()) . ' ';
                         $actLinks .= wf_Link('?module=custmaps&showmap=' . $each['mapid'] . '&locateitem=' . $each['geo'] . '&zoom=' . $this->ymapsCfg['FINDING_ZOOM'], wf_img('skins/icon_search_small.gif', __('Find on map')), false) . ' ';
                         $actLinks .= $indicator;
                         $cells .= wf_TableCell($actLinks);
                         $rows .= wf_TableRow($cells, 'row3');
                         $itemsCount++;
                     }
                 }
             }
         }
     }
     $result .= wf_TableBody($rows, '100%', '0', 'sortable');
     $result .= __('Total') . ': ' . $itemsCount;
     return $result;
     return $result;
 }
示例#6
0
 /**
  * Renders available tasks list with controls
  * 
  * @param sring $login
  * 
  * @return string
  */
 public function renderTasksList($login = '')
 {
     $result = '';
     $messages = new UbillingMessageHelper();
     $tmpArr = array();
     if (!empty($this->allTasks)) {
         foreach ($this->allTasks as $io => $each) {
             if (empty($login)) {
                 $tmpArr[$io] = $each;
             } else {
                 if ($login == $each['login']) {
                     $tmpArr[$io] = $each;
                 }
             }
         }
     }
     if (!empty($tmpArr)) {
         $cells = wf_TableCell(__('ID'));
         $cells .= wf_TableCell(__('Date'));
         $cells .= wf_TableCell(__('User'));
         $cells .= wf_TableCell(__('Task'));
         $cells .= wf_TableCell(__('Parameter'));
         $cells .= wf_TableCell(__('Notes'));
         $cells .= wf_TableCell(__('Actions'));
         $rows = wf_TableRow($cells, 'row1');
         foreach ($tmpArr as $io => $each) {
             $cells = wf_TableCell($each['id']);
             $cells .= wf_TableCell($each['date']);
             $cells .= wf_TableCell(wf_Link('?module=userprofile&username='******'login'], web_profile_icon() . ' ' . $each['login'], false, ''));
             $cells .= wf_TableCell($this->actionNames[$each['action']]);
             $cells .= wf_TableCell($each['param']);
             $cells .= wf_TableCell($each['note']);
             $taskControls = wf_JSAlert(self::URL_ME . '&username='******'login'] . '&deletetaskid=' . $each['id'], web_delete_icon(), $messages->getDeleteAlert());
             $cells .= wf_TableCell($taskControls);
             $rows .= wf_TableRow($cells, 'row3');
         }
         $result = wf_TableBody($rows, '100%', 0, 'sortable');
     } else {
         $result = $messages->getStyledMessage(__('Nothing found'), 'info');
     }
     return $result;
 }
示例#7
0
 /**
  * Returns ONU edit form
  * 
  * @param int $onuId
  * 
  * @return string
  */
 public function onuEditForm($onuId)
 {
     $onuId = vf($onuId, 3);
     $result = '';
     if (isset($this->allOnu[$onuId])) {
         $messages = new UbillingMessageHelper();
         $models = array();
         if (!empty($this->allModelsData)) {
             foreach ($this->allModelsData as $io => $each) {
                 $models[$each['id']] = $each['modelname'];
             }
         }
         $inputs = wf_HiddenInput('editonu', $onuId);
         $inputs .= wf_Selector('editoltid', $this->allOltDevices, __('OLT device') . $this->sup, $this->allOnu[$onuId]['oltid'], true);
         $inputs .= wf_Selector('editonumodelid', $models, __('ONU model') . $this->sup, $this->allOnu[$onuId]['onumodelid'], true);
         $inputs .= wf_TextInput('editip', __('IP'), $this->allOnu[$onuId]['ip'], true, 20);
         $inputs .= wf_TextInput('editmac', __('MAC') . $this->sup . ' ' . $this->getSearchmacControl($this->allOnu[$onuId]['mac']), $this->allOnu[$onuId]['mac'], true, 20);
         $inputs .= wf_TextInput('editserial', __('Serial number'), $this->allOnu[$onuId]['serial'], true, 20);
         $inputs .= wf_TextInput('editlogin', __('Login'), $this->allOnu[$onuId]['login'], true, 20);
         $inputs .= wf_Submit(__('Save'));
         $result = wf_Form('', 'POST', $inputs, 'glamour');
         $result .= wf_CleanDiv();
         $result .= wf_delimiter();
         $result .= wf_Link('?module=ponizer', __('Back'), false, 'ubButton');
         if (!empty($this->allOnu[$onuId]['login'])) {
             $result .= wf_Link('?module=userprofile&username='******'login'], wf_img('skins/icon_user.gif') . ' ' . __('User profile'), false, 'ubButton');
         }
         $result .= wf_JSAlertStyled('?module=ponizer&deleteonu=' . $onuId, web_delete_icon() . ' ' . __('Delete'), $messages->getDeleteAlert(), 'ubButton');
     } else {
         $result = wf_tag('div', false, 'alert_error') . __('Strange exeption') . ': ONUID_NOT_EXISTS' . wf_tag('div', true);
     }
     //Signal history chart
     $result .= $this->onuSignalHistory($onuId);
     //additional comments handling
     if ($this->altCfg['ADCOMMENTS_ENABLED']) {
         $adcomments = new ADcomments('PONONU');
         $result .= wf_delimiter();
         $result .= wf_tag('h3') . __('Additional comments') . wf_tag('h3', true);
         $result .= $adcomments->renderComments($onuId);
     }
     return $result;
 }
示例#8
0
 /**
  * Renders available employee wages list with some controls
  * 
  * @return string
  */
 public function employeeWagesRender()
 {
     $result = '';
     $messages = new UbillingMessageHelper();
     $cells = wf_TableCell(__('Employee'));
     $cells .= wf_TableCell(__('Wage'));
     $cells .= wf_TableCell(__('Bounty'));
     $cells .= wf_TableCell(__('Work hours'));
     $cells .= wf_TableCell(__('Actions'));
     $rows = wf_TableRow($cells, 'row1');
     if (!empty($this->allWages)) {
         foreach ($this->allWages as $io => $each) {
             $rowClass = isset($this->allEmployee[$io]) ? 'row3' : 'sigdeleteduser';
             $cells = wf_TableCell(@$this->allEmployeeRaw[$io]);
             $cells .= wf_TableCell($this->allWages[$io]['wage']);
             $cells .= wf_TableCell($this->allWages[$io]['bounty']);
             $cells .= wf_TableCell($this->allWages[$io]['worktime']);
             $actlinks = wf_JSAlertStyled('?module=salary&employeewages=true&deletewage=' . $io, web_delete_icon(), $messages->getDeleteAlert());
             $actlinks .= wf_modalAuto(web_edit_icon(), __('Edit'), $this->employeeWageEditForm($io));
             $cells .= wf_TableCell($actlinks);
             $rows .= wf_TableRow($cells, $rowClass);
         }
     }
     $result = wf_TableBody($rows, '100%', 0, 'sortable');
     return $result;
 }
示例#9
0
 /**
  * Renders phone data with available controls
  * 
  * @return string
  */
 public function renderContacts()
 {
     $result = '';
     $messages = new UbillingMessageHelper();
     if (!empty($this->allContacts) or !empty($this->allBuildContacts)) {
         $cells = wf_TableCell(__('Phone'));
         $cells .= wf_TableCell(__('Name'));
         if (cfr('PHONEBOOKEDIT')) {
             $cells .= wf_TableCell(__('Actions'));
         }
         $rows = wf_TableRow($cells, 'row1');
         //normal contacts processing
         if (!empty($this->allContacts)) {
             foreach ($this->allContacts as $io => $each) {
                 $cells = wf_TableCell($each['phone']);
                 $cells .= wf_TableCell($each['name']);
                 if (cfr('PHONEBOOKEDIT')) {
                     $actLinks = wf_JSAlert(self::URL_ME . '&deletecontactid=' . $io, web_delete_icon(), $messages->getDeleteAlert());
                     $actLinks .= wf_modalAuto(web_edit_icon(), __('Edit'), $this->editForm($io));
                     $cells .= wf_TableCell($actLinks);
                 }
                 $rows .= wf_TableRow($cells, 'row3');
             }
         }
         //build passport contacts processing
         if (!empty($this->allBuildContacts)) {
             foreach ($this->allBuildContacts as $io => $each) {
                 $cells = wf_TableCell($each['phone']);
                 $cells .= wf_TableCell($each['name']);
                 if (cfr('PHONEBOOKEDIT')) {
                     $cells .= wf_TableCell('');
                 }
                 $rows .= wf_TableRow($cells, 'row3');
             }
         }
         $result .= wf_TableBody($rows, '100%', 0, 'sortable');
     } else {
         $messages = new UbillingMessageHelper();
         $result = $messages->getStyledMessage(__('Nothing found'), 'info');
     }
     return $result;
 }
示例#10
0
 /**
  * Renders list of associated friend users for some parent login
  * 
  * @param string $parentLogin
  * 
  * @return string
  */
 public function renderFriendsList($parentLogin)
 {
     $result = '';
     $allRealnames = zb_UserGetAllRealnames();
     $allAddress = zb_AddressGetFulladdresslistCached();
     $messages = new UbillingMessageHelper();
     $friendCount = 0;
     if (!empty($this->allFriends)) {
         $cells = wf_TableCell(__('Login'));
         $cells .= wf_TableCell(__('Real Name'));
         $cells .= wf_TableCell(__('Full address'));
         $cells .= wf_TableCell(__('Actions'));
         $rows = wf_TableRow($cells, 'row1');
         foreach ($this->allFriends as $friendLogin => $parent) {
             if ($parent == $parentLogin) {
                 $cells = wf_TableCell(wf_Link('?module=userprofile&username='******' ' . $friendLogin));
                 $cells .= wf_TableCell(@$allRealnames[$friendLogin]);
                 $cells .= wf_TableCell(@$allAddress[$friendLogin]);
                 $actLinks = wf_JSAlert('?module=pl_friendship&username='******'&deletefriend=' . $friendLogin, web_delete_icon(), $messages->getDeleteAlert());
                 $cells .= wf_TableCell($actLinks);
                 $rows .= wf_TableRow($cells, 'row2');
                 $friendCount++;
             }
         }
         if ($friendCount > 0) {
             $result = wf_TableBody($rows, '100%', 0, 'sortable');
             $result .= __('Total') . ': ' . $friendCount;
         } else {
             $result = $messages->getStyledMessage(__('Nothing found'), 'info');
         }
     } else {
         $result = $messages->getStyledMessage(__('Nothing found'), 'info');
     }
     return $result;
 }