/** * Renders user profile with all loaded data * * @return string */ public function render() { //all configurable features must be received via getters $profile = ''; //activity and other flags $passiveicon = $this->userdata['Passive'] ? wf_img_sized('skins/icon_passive.gif', '', '', '12') . ' ' : ''; $downicon = $this->userdata['Down'] ? wf_img_sized('skins/icon_down.gif', '', '', '12') . ' ' : ''; $activity = $this->userdata['Cash'] < '-' . $this->userdata['Credit'] ? wf_img_sized('skins/icon_inactive.gif', '', '', '12') . ' ' . __('No') : wf_img_sized('skins/icon_active.gif', '', '', '12') . ' ' . __('Yes'); // user linking controller $profile .= $this->getUserLinking(); $profile .= wf_tag('table', false, '', self::MAIN_TABLE_STYLE); //external profile container $profile .= wf_tag('tbody', false); $profile .= wf_tag('tr', false); $profile .= wf_tag('td', false, '', 'valign="top"'); $profile .= wf_tag('table', false, '', self::MAIN_TABLE_STYLE); //main profile data $profile .= wf_tag('tbody', false); //address row and controls $profile .= $this->addRow(__('Full address') . $this->getTaskCreateControl(), $this->useraddress . $this->getBuildControls()); //apt data like floor and entrance row $profile .= $this->addRow(__('Entrance') . ', ' . __('Floor'), @$this->aptdata['entrance'] . ' ' . @$this->aptdata['floor']); //realname row $profile .= $this->addRow(__('Real name') . $this->getPhotostorageControls() . $this->getPassportDataControl(), $this->realname, true); //contract row $profile .= $this->addRow(__('Contract'), $this->contract, false); //contract date row $profile .= $this->getContractDate(); //assigned agents row $profile .= $this->getAgentsControls(); //old corporate users aka userlinking $profile .= $this->getCorporateControls(); //phone $profile .= $this->addRow(__('Phone'), $this->phone); //and mobile data rows $profile .= $this->addRow(__('Mobile'), $this->mobile); //Email data row $profile .= $this->addRow(__('Email'), $this->mail); //payment ID data $profile .= $this->addRow(__('Payment ID'), $this->paymentid, true); //LAT data row $profile .= $this->getUserLat(); //login row $profile .= $this->addRow(__('Login'), $this->userdata['login'], true); //password row $profile .= $this->addRow(__('Password'), $this->getUserPassword(), true); //User IP data and extended networks controls if available $profile .= $this->addRow(__('IP'), $this->userdata['IP'] . $this->getExtNetsControls(), true); //MAC address row $profile .= $this->addRow(__('MAC') . ' ' . $this->getSearchmacControl() . ' ' . $this->getProfileFdbSearchControl(), $this->mac); //User tariff row $profile .= $this->addRow(__('Tariff') . $this->getTariffInfoControls($this->userdata['Tariff']), $this->userdata['Tariff'] . $this->getTariffInfoContrainer(), true); //Tariff change row $profile .= $this->addRow(__('Planned tariff change') . $this->getTariffInfoControls($this->userdata['TariffChange']), $this->userdata['TariffChange']); //old CaTv backlink if needed $profile .= $this->getCatvBacklinks(); //Speed override row $profile .= $this->addRow(__('Speed override'), $this->speedoverride); // signup pricing row $profile .= $this->getSignupPricing(); //User current cash row $profile .= $this->addRow(__('Balance'), $this->getUserCash(), true); //User credit row & easycredit control if needed $profile .= $this->addRow(__('Credit') . ' ' . $this->getEasyCreditController(), $this->userdata['Credit'], true); //credit expire row $profile .= $this->addRow(__('Credit expire'), $this->getUserCreditExpire()); //Prepayed traffic $profile .= $this->addRow(__('Prepayed traffic'), $this->userdata['FreeMb']); //finance activity row $profile .= $this->addRow(__('Active') . $this->getCemeteryControls(), $activity); //DN online detection row $profile .= $this->getUserOnlineDN(); //Always online flag row $profile .= $this->addRow(__('Always Online'), web_trigger($this->userdata['AlwaysOnline'])); //Detail stats flag row $profile .= $this->addRow(__('Disable detailed stats'), web_trigger($this->userdata['DisabledDetailStat'])); //Frozen aka passive flag row $profile .= $this->addRow(__('Freezed'), $passiveicon . web_trigger($this->userdata['Passive']), true); //Disable aka Down flag row $profile .= $this->addRow(__('Disabled'), $downicon . web_trigger($this->userdata['Down']), true); //Connection details row $profile .= $this->getUserConnectionDetails(); //User notes row $profile .= $this->addRow(__('Notes'), zb_UserGetNotes($this->login) . $this->getAdcommentsIndicator()); $profile .= wf_tag('tbody', true); $profile .= wf_tag('table', true); $profile .= wf_tag('td', true); //end of main profile container $profile .= wf_tag('td', false, '', 'valign="top" width="10%"'); //profile plugins container $profile .= $this->plugins; $profile .= wf_tag('td', true); // end of plugins container $profile .= wf_tag('tr', true); // close profile+plugins row $profile .= wf_tag('tbody', true); $profile .= wf_tag('table', true); //end of all profile container //profile switch port controls $profile .= $this->getSwitchAssignControls(); //profile onu signal controls $profile .= $this->getPonSignalControl(); //profile vlan controls $profile .= $this->getVlanAssignControls(); //profile vlan online $profile .= $this->getVlanOnline(); //Custom filelds display $profile .= cf_FieldShower($this->login); //Tags add control and exiting tags listing if (cfr('TAGS')) { $profile .= wf_Link('?module=usertags&username='******'Tags')), false); } $profile .= stg_show_user_tags($this->login); //main profile controls here $profile .= $this->getMainControls(); //Profile ending anchor for addcash links scroll $profile .= wf_tag('a', false, '', 'id="profileending"') . wf_tag('a', true); return $profile; }
// tag deletion if (isset($_GET['deletetag'])) { //reset user if needed if ($alter_conf['RESETONTAGCHANGE']) { $billing->resetuser($uname); log_register("RESET User (" . $uname . ")"); } if (!$alter_conf['CEMETERY_ENABLED']) { //normal tag deletion stg_del_user_tag($_GET['deletetag']); rcms_redirect("?module=usertags&username="******"?module=usertags&username=" . $uname); } else { show_warning(__('This tag type is protected by cemetery')); } } } show_window(__('Tags'), stg_show_user_tags($uname)); stg_tagadd_selector(); stg_tagdel_selector($uname); show_window('', web_UserControls($uname)); } } else { show_error(__('Access denied')); }