本文整理汇总了PHP中zb_UserGetAllRealnames函数的典型用法代码示例。如果您正苦于以下问题:PHP zb_UserGetAllRealnames函数的具体用法?PHP zb_UserGetAllRealnames怎么用?PHP zb_UserGetAllRealnames使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zb_UserGetAllRealnames函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: render
public function render()
{
$cells = wf_TableCell(__('Login'));
$cells .= wf_TableCell(__('Address'));
$cells .= wf_TableCell(__('Real Name'));
$cells .= wf_TableCell(__('IP'));
$cells .= wf_TableCell(__('Tariff'));
$cells .= wf_TableCell(__('Traffic'));
$cells .= wf_TableCell(__('Actions'));
$rows = wf_TableRow($cells, 'row1');
if (!empty($this->data)) {
$allrealnames = zb_UserGetAllRealnames();
$alladdress = zb_AddressGetFulladdresslist();
foreach ($this->data as $io => $each) {
$loginLink = wf_Link("?module=userprofile&username=" . $each['login'], web_profile_icon() . ' ' . $each['login'], false, '');
$cells = wf_TableCell($loginLink);
$cells .= wf_TableCell(@$alladdress[$each['login']]);
$cells .= wf_TableCell(@$allrealnames[$each['login']]);
$cells .= wf_TableCell($each['IP']);
$cells .= wf_TableCell($each['Tariff']);
$cells .= wf_TableCell(stg_convert_size($each['traffic']), '', '', 'sorttable_customkey="' . $each['traffic'] . '"');
$actionLinks = wf_Link('?module=pl_traffdetails&username=' . $each['login'], wf_img('skins/icon_stats.gif', __('Detailed stats')), false, '');
$actionLinks .= wf_link('?module=dstatedit&username=' . $each['login'], web_edit_icon(), false, '');
$cells .= wf_TableCell($actionLinks);
$rows .= wf_TableRow($cells, 'row3');
}
}
$result = wf_TableBody($rows, '100%', '0', 'sortable');
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:30,代码来源:index.php
示例2: web_CardShowUsageByMonth
/**
* Renders search results for used cards
*
* @param int $year
* @param string $month
*
* @return void
*/
function web_CardShowUsageByMonth($year, $month)
{
$month = mysql_real_escape_string($month);
$year = mysql_real_escape_string($year);
$query = "SELECT * from `cardbank` WHERE `usedate` LIKE '%" . $year . "-" . $month . "-%'";
$allusedcards = simple_queryall($query);
$allrealnames = zb_UserGetAllRealnames();
$alladdress = zb_AddressGetFulladdresslist();
$totalsumm = 0;
$totalcount = 0;
$csvdata = '';
$tablecells = wf_TableCell(__('ID'));
$tablecells .= wf_TableCell(__('Serial number'));
$tablecells .= wf_TableCell(__('Cash'));
$tablecells .= wf_TableCell(__('Usage date'));
$tablecells .= wf_TableCell(__('Used login'));
$tablecells .= wf_TableCell(__('Full address'));
$tablecells .= wf_TableCell(__('Real name'));
$tablerows = wf_TableRow($tablecells, 'row1');
if (!empty($allusedcards)) {
$csvdata = __('ID') . ';' . __('Serial number') . ';' . __('Cash') . ';' . __('Usage date') . ';' . __('Used login') . ';' . __('Full address') . ';' . __('Real name') . "\n";
foreach ($allusedcards as $io => $eachcard) {
$tablecells = wf_TableCell($eachcard['id']);
$tablecells .= wf_TableCell($eachcard['serial']);
$tablecells .= wf_TableCell($eachcard['cash']);
$tablecells .= wf_TableCell($eachcard['usedate']);
$profilelink = wf_Link("?module=userprofile&username=" . $eachcard['usedlogin'], web_profile_icon() . ' ' . $eachcard['usedlogin'], false);
$tablecells .= wf_TableCell($profilelink);
@($useraddress = $alladdress[$eachcard['usedlogin']]);
$tablecells .= wf_TableCell($useraddress);
@($userrealname = $allrealnames[$eachcard['usedlogin']]);
$tablecells .= wf_TableCell($userrealname);
$tablerows .= wf_TableRow($tablecells, 'row3');
$totalcount++;
$totalsumm = $totalsumm + $eachcard['cash'];
$csvdata .= $eachcard['id'] . ';' . $eachcard['serial'] . ';' . $eachcard['cash'] . ';' . $eachcard['usedate'] . ';' . $eachcard['usedlogin'] . ';' . $useraddress . ';' . $userrealname . "\n";
}
}
if (!empty($csvdata)) {
$exportFilename = 'exports/cardreport_' . $year . '-' . $month . '.csv';
$csvdata = iconv('utf-8', 'windows-1251', $csvdata);
file_put_contents($exportFilename, $csvdata);
$exportLink = wf_Link('?module=cardreport&dloadcsv=' . base64_encode($exportFilename), wf_img('skins/excel.gif', __('Export')), false, '');
} else {
$exportLink = '';
}
$result = wf_TableBody($tablerows, '100%', '0', 'sortable');
$result .= __('Total') . ': ' . $totalcount . ' ' . __('payments') . ', ' . __('with total amount') . ': ' . $totalsumm;
show_window(__('Payment cards usage report') . ' ' . $exportLink, $result);
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:58,代码来源:index.php
示例3: web_VserviceCashForm
function web_VserviceCashForm($login)
{
$currentvcash = zb_VserviceCashGet($login);
$alladdr = zb_AddressGetFulladdresslist();
$allrealnames = zb_UserGetAllRealnames();
$form = '
<form action="" method="POST">
<table width="50%" border="0">
<tr>
<td class="row2">' . __('Login') . '</td>
<td class="row3">' . $login . '</td>
</tr>
<tr>
<td class="row2">' . __('Address') . '</td>
<td class="row3">' . @$alladdr[$login] . '</td>
</tr>
<tr>
<td class="row2">' . __('Real Name') . '</td>
<td class="row3">' . @$allrealnames[$login] . '</td>
</tr>
<tr>
<td class="row2">' . __('Current Cash state') . '</td>
<td class="row3">' . $currentvcash . '</td>
</tr>
<tr>
<td class="row2">' . __('New cash') . '</td>
<td class="row3"><input name="newcash" size="5" type="text"></td>
</tr>
<tr>
<td class="row2">' . __('Actions') . '</td>
<td class="row3">
<input name="operation" value="add" checked="checked" type="radio"> ' . __('Add cash') . '
<input name="operation" value="set" type="radio"> ' . __('Set cash') . '
</td>
</tr>
<tr>
<td class="row2">' . __('Payment type') . '</td>
<td class="row3">' . web_CashTypeSelector() . '</td>
</tr>
<tr>
<td class="row2">' . __('Virtual services') . '</td>
<td class="row3">' . web_VservicesSelector() . '</td>
</tr>
</table>
<input type="submit" value="' . __('Change') . '">
</form>';
return $form;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:49,代码来源:index.php
示例4: ajaxGetData
/**
* Returns JSON reply for jquery datatables with full list of available UHW usages
*
* @return string
*/
public function ajaxGetData()
{
$query = "SELECT * from `uhw_log` ORDER by `id` DESC;";
$alluhw = simple_queryall($query);
$alladdress = zb_AddressGetFulladdresslist();
$allrealnames = zb_UserGetAllRealnames();
$result = '{
"aaData": [ ';
if (!empty($alluhw)) {
foreach ($alluhw as $io => $each) {
$profileLink = wf_Link('?module=userprofile&username=' . $each['login'], web_profile_icon() . ' ' . $each['login'], false);
$profileLink = str_replace('"', '', $profileLink);
$profileLink = str_replace("'", '', $profileLink);
$profileLink = trim($profileLink);
$userAddress = @$alladdress[$each['login']];
$userAddress = str_replace("'", '`', $userAddress);
$userAddress = str_replace('"', '``', $userAddress);
$userAddress = trim($userAddress);
$userRealname = @$allrealnames[$each['login']];
$userRealname = str_replace("'", '`', $userRealname);
$userRealname = str_replace('"', '``', $userRealname);
$userRealname = trim($userRealname);
$result .= '
[
"' . $each['id'] . '",
"' . $each['date'] . '",
"' . $each['password'] . '",
"' . $profileLink . '",
"' . $userAddress . '",
"' . $userRealname . '",
"' . $each['ip'] . '",
"' . $each['nhid'] . '",
"' . $each['oldmac'] . '",
"' . $each['newmac'] . '"
],';
}
}
$result = substr($result, 0, -1);
$result .= ']
}';
return $result;
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:47,代码来源:api.uhw.php
示例5: web_UsersLister
function web_UsersLister($users)
{
$tablecells = wf_TableCell(__('Login'));
$tablecells .= wf_TableCell(__('Real Name'));
$tablecells .= wf_TableCell(__('Full address'));
$tablecells .= wf_TableCell(__('Tariff'));
$tablecells .= wf_TableCell(__('Tariff speeds'));
$tablecells .= wf_TableCell(__('Speed override'));
$tablecells .= wf_TableCell(__('Actions'));
$tablerows = wf_TableRow($tablecells, 'row1');
if (!empty($users)) {
$udata = array();
$alluserdata = zb_UserGetAllStargazerData();
$alladdress = zb_AddressGetFulladdresslist();
$allrealnames = zb_UserGetAllRealnames();
$allspeeds = zb_TariffGetAllSpeeds();
if (!empty($alluserdata)) {
foreach ($alluserdata as $ia => $eachdata) {
$udata[$eachdata['login']]['Tariff'] = $eachdata['Tariff'];
@($udata[$eachdata['login']]['Address'] = $alladdress[$eachdata['login']]);
@($udata[$eachdata['login']]['RealName'] = $allrealnames[$eachdata['login']]);
@($udata[$eachdata['login']]['NormalSpeedDown'] = $allspeeds[$eachdata['Tariff']]['speeddown']);
@($udata[$eachdata['login']]['NormalSpeedUp'] = $allspeeds[$eachdata['Tariff']]['speedup']);
}
}
foreach ($users as $io => $eachuser) {
$tablecells = wf_TableCell(wf_Link('?module=userprofile&username=' . $eachuser['login'], web_profile_icon() . ' ' . $eachuser['login']));
$tablecells .= wf_TableCell($udata[$eachuser['login']]['RealName']);
$tablecells .= wf_TableCell($udata[$eachuser['login']]['Address']);
$tablecells .= wf_TableCell($udata[$eachuser['login']]['Tariff']);
$tablecells .= wf_TableCell($udata[$eachuser['login']]['NormalSpeedDown'] . '/' . $udata[$eachuser['login']]['NormalSpeedUp']);
$tablecells .= wf_TableCell(zb_UserGetSpeedOverride($eachuser['login']));
$fixlink = wf_JSAlert('?module=speedcontrol&fix=' . $eachuser['login'], '<img src="skins/icon_repair.gif" title=' . __('Fix') . '>', 'Are you serious');
$tablecells .= wf_TableCell($fixlink);
$tablerows .= wf_TableRow($tablecells, 'row3');
}
}
$result = wf_TableBody($tablerows, '100%', '0', 'sortable');
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:40,代码来源:index.php
示例6: web_TicketDialogue
/**
* Renders ticket, all of replies and all needed controls/forms for they
*
* @param int $ticketid
*
* @return string
*/
function web_TicketDialogue($ticketid)
{
$ticketid = vf($ticketid, 3);
$ticketdata = zb_TicketGetData($ticketid);
$ticketreplies = zb_TicketGetReplies($ticketid);
$result = wf_tag('p', false, '', 'align="right"') . wf_Link('?module=ticketing', 'Back to tickets list', true, 'ubButton') . wf_tag('p', true);
if (!empty($ticketdata)) {
$alladdress = zb_AddressGetFulladdresslist();
$allrealnames = zb_UserGetAllRealnames();
$alltariffs = zb_TariffsGetAllUsers();
$allcash = zb_CashGetAllUsers();
$allcredits = zb_CreditGetAllUsers();
$alluserips = zb_UserGetAllIPs();
if ($ticketdata['status']) {
$actionlink = wf_Link('?module=ticketing&openticket=' . $ticketdata['id'], 'Open', false, 'ubButton');
} else {
$actionlink = wf_Link('?module=ticketing&closeticket=' . $ticketdata['id'], 'Close', false, 'ubButton');
}
$tablecells = wf_TableCell(__('ID'));
$tablecells .= wf_TableCell(__('Date'));
$tablecells .= wf_TableCell(__('Login'));
$tablecells .= wf_TableCell(__('Real Name'));
$tablecells .= wf_TableCell(__('Full address'));
$tablecells .= wf_TableCell(__('IP'));
$tablecells .= wf_TableCell(__('Tariff'));
$tablecells .= wf_TableCell(__('Balance'));
$tablecells .= wf_TableCell(__('Credit'));
$tablecells .= wf_TableCell(__('Processed'));
$tablerows = wf_TableRow($tablecells, 'row1');
$tablecells = wf_TableCell($ticketdata['id']);
$tablecells .= wf_TableCell($ticketdata['date']);
$profilelink = wf_Link('?module=userprofile&username=' . $ticketdata['from'], web_profile_icon() . ' ' . $ticketdata['from']);
$tablecells .= wf_TableCell($profilelink);
$tablecells .= wf_TableCell(@$allrealnames[$ticketdata['from']]);
$tablecells .= wf_TableCell(@$alladdress[$ticketdata['from']]);
$tablecells .= wf_TableCell(@$alluserips[$ticketdata['from']]);
$tablecells .= wf_TableCell(@$alltariffs[$ticketdata['from']]);
$tablecells .= wf_TableCell(@$allcash[$ticketdata['from']]);
$tablecells .= wf_TableCell(@$allcredits[$ticketdata['from']]);
$tablecells .= wf_TableCell(web_bool_led($ticketdata['status']));
$tablerows .= wf_TableRow($tablecells, 'row3');
$result .= wf_TableBody($tablerows, '100%', '0');
//ticket body
$tickettext = strip_tags($ticketdata['text']);
$tickettext = nl2br($tickettext);
$tablecells = wf_TableCell('', '20%');
$tablecells .= wf_TableCell($ticketdata['date']);
$tablerows = wf_TableRow($tablecells, 'row2');
$ticketauthor = wf_tag('center') . wf_tag('b') . @$allrealnames[$ticketdata['from']] . wf_tag('b', true) . wf_tag('center', true);
$ticketavatar = wf_tag('center') . wf_img('skins/userava.png') . wf_tag('center', true);
$ticketpanel = $ticketauthor . wf_tag('br') . $ticketavatar;
$tablecells = wf_TableCell($ticketpanel);
$tablecells .= wf_TableCell($tickettext);
$tablerows .= wf_TableRow($tablecells, 'row3');
$result .= wf_TableBody($tablerows, '100%', '0', 'glamour');
$result .= $actionlink;
}
if (!empty($ticketreplies)) {
$result .= wf_tag('h2') . __('Replies') . wf_tag('h2', true);
$result .= wf_CleanDiv();
foreach ($ticketreplies as $io => $eachreply) {
//reply
if ($eachreply['admin']) {
$replyauthor = wf_tag('center') . wf_tag('b') . $eachreply['admin'] . wf_tag('b', true) . wf_tag('center', true);
$replyavatar = wf_tag('center') . gravatar_ShowAdminAvatar($eachreply['admin'], '64') . wf_tag('center', true);
} else {
$replyauthor = wf_tag('center') . wf_tag('b') . @$allrealnames[$eachreply['from']] . wf_tag('b', true) . wf_tag('center', true);
$replyavatar = wf_tag('center') . wf_img('skins/userava.png') . wf_tag('center', true);
}
$replyactions = wf_tag('center');
$replyactions .= wf_JSAlert('?module=ticketing&showticket=' . $ticketdata['id'] . '&deletereply=' . $eachreply['id'], web_delete_icon(), 'Removing this may lead to irreparable results') . ' ';
$replyactions .= wf_JSAlert('?module=ticketing&showticket=' . $ticketdata['id'] . '&editreply=' . $eachreply['id'], web_edit_icon(), 'Are you serious');
$replyactions .= wf_tag('center', true);
// reply body
if (isset($_GET['editreply'])) {
if ($_GET['editreply'] == $eachreply['id']) {
//is this reply editing?
$replytext = web_TicketReplyEditForm($eachreply['id']);
} else {
//not this ticket edit
$replytext = strip_tags($eachreply['text']);
}
} else {
//normal text by default
$replytext = strip_tags($eachreply['text']);
$replytext = nl2br($replytext);
}
$replypanel = $replyauthor . wf_tag('br') . $replyavatar . wf_tag('br') . $replyactions;
$tablecells = wf_TableCell('', '20%');
$tablecells .= wf_TableCell($eachreply['date']);
$tablerows = wf_TableRow($tablecells, 'row2');
$tablecells = wf_TableCell($replypanel);
$tablecells .= wf_TableCell($replytext);
//.........这里部分代码省略.........
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:101,代码来源:api.ticketing.php
示例7: loadRawdata
/**
* Preloads raw data for searchable user fields and controls caching
*
* @return void
*/
protected function loadRawdata($forceCache = false)
{
$cacheTime = $this->alterConf['GLOBALSEARCH_CACHE'];
$cacheTime = time() - $cacheTime * 60;
//in minutes
//extracting user fields types to load
if (!empty($this->alterConf['GLOBALSEARCH_FIELDS'])) {
$this->fields = explode(',', $this->alterConf['GLOBALSEARCH_FIELDS']);
$this->fields = array_flip($this->fields);
}
$updateCache = false;
if (file_exists(self::CACHE_NAME)) {
$updateCache = false;
if (filemtime(self::CACHE_NAME) > $cacheTime) {
$updateCache = false;
} else {
$updateCache = true;
}
} else {
$updateCache = true;
}
//force cache parameter
if ($forceCache) {
$updateCache = true;
}
//updating rawdata cache
if ($updateCache) {
//loading needed fields
if (isset($this->fields['realname'])) {
$this->rawData = $this->rawData + $this->transformArray(zb_UserGetAllRealnames(), __('Real Name'), 'realname');
}
if (isset($this->fields['address'])) {
$this->rawData = $this->rawData + $this->transformArray(zb_AddressGetFulladdresslist(), __('Full address'), 'address');
}
if (isset($this->fields['contract'])) {
$allContracts = zb_UserGetAllContracts();
$allContracts = array_flip($allContracts);
$this->rawData = $this->rawData + $this->transformArray($allContracts, __('Contract'), 'contract');
}
if (isset($this->fields['phone']) or isset($this->fields['mobile'])) {
$allPhonedata = zb_UserGetAllPhoneData();
if (isset($this->fields['phone'])) {
if (!empty($allPhonedata)) {
$allPhones = array();
foreach ($allPhonedata as $io => $each) {
$allPhones[$io] = $each['phone'];
}
$this->rawData = $this->rawData + $this->transformArray($allPhones, __('Phone'), 'phone');
}
}
if (isset($this->fields['mobile'])) {
if (!empty($allPhonedata)) {
$allMobiles = array();
foreach ($allPhonedata as $io => $each) {
$allMobiles[$io] = $each['mobile'];
}
$this->rawData = $this->rawData + $this->transformArray($allMobiles, __('Mobile'), 'mobile');
}
}
}
if (isset($this->fields['ip'])) {
$this->rawData = $this->rawData + $this->transformArray(zb_UserGetAllIPs(), __('IP'), 'ip');
}
if (isset($this->fields['mac'])) {
$this->rawData = $this->rawData + $this->transformArray(zb_UserGetAllIpMACs(), __('MAC address'), 'mac');
}
if (isset($this->fields['login'])) {
$allLogins = zb_UserGetAllStargazerLogins();
$this->rawData = $this->rawData + $this->transformArray($allLogins, __('Login'), 'login');
}
if (isset($this->fields['seal'])) {
$conDet = new ConnectionDetails();
$allSeals = $conDet->getAllSeals();
$this->rawData = $this->rawData + $this->transformArray($allSeals, __('Cable seal'), 'seal');
}
if (isset($this->fields['paymentid'])) {
if ($this->alterConf['OPENPAYZ_REALID']) {
$allPayIds_q = "SELECT * from `op_customers`";
$allPayIds = simple_queryall($allPayIds_q);
$tmpArrPayids = array();
if (!empty($allPayIds)) {
foreach ($allPayIds as $io => $each) {
$tmpArrPayids[$each['realid']] = $each['virtualid'];
}
}
$this->rawData = $this->rawData + $this->transformArray($tmpArrPayids, __('Payment ID'), 'payid');
} else {
$allPayIds_q = "SELECT `login`,`IP` from `users`";
$allPayIds = simple_queryall($allPayIds_q);
$tmpArrPayids = array();
if (!empty($allPayIds)) {
foreach ($allPayIds as $io => $each) {
$tmpArrPayids[$each['login']] = ip2int($each['IP']);
}
}
//.........这里部分代码省略.........
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:101,代码来源:api.globalsearch.php
示例8: zb_TemplateGetAllUserData
/**
* Returns all data about current userbase
* which used for templatizing functions
*
* @return array
*/
function zb_TemplateGetAllUserData()
{
$altcfg = rcms_parse_ini_file(CONFIG_PATH . "alter.ini");
$userdata = array();
$alluserdata = zb_UserGetAllStargazerData();
$tariffspeeds = zb_TariffGetAllSpeeds();
$tariffprices = zb_TariffGetPricesAll();
$multinetdata = zb_MultinetGetAllData();
$allcontracts = zb_UserGetAllContracts();
$allcontracts = array_flip($allcontracts);
$allrealnames = zb_UserGetAllRealnames();
$alladdress = zb_AddressGetFulladdresslist();
$allemails = zb_UserGetAllEmails();
$allnasdata = zb_NasGetAllData();
$allcfdata = cf_FieldsGetAll();
$allpdata = zb_UserPassportDataGetAll();
if ($altcfg['OPENPAYZ_REALID']) {
$allopcustomers = zb_TemplateGetAllOPCustomers();
}
if (!empty($alluserdata)) {
foreach ($alluserdata as $io => $eachuser) {
$userdata[$eachuser['login']]['login'] = $eachuser['login'];
$userdata[$eachuser['login']]['password'] = $eachuser['Password'];
$userdata[$eachuser['login']]['userhash'] = crc16($eachuser['login']);
$userdata[$eachuser['login']]['tariff'] = $eachuser['Tariff'];
@($userdata[$eachuser['login']]['tariffprice'] = $tariffprices[$eachuser['Tariff']]);
$userdata[$eachuser['login']]['cash'] = $eachuser['Cash'];
$userdata[$eachuser['login']]['credit'] = $eachuser['Credit'];
$userdata[$eachuser['login']]['down'] = $eachuser['Down'];
$userdata[$eachuser['login']]['passive'] = $eachuser['Passive'];
$userdata[$eachuser['login']]['ao'] = $eachuser['AlwaysOnline'];
@($userdata[$eachuser['login']]['contract'] = $allcontracts[$eachuser['login']]);
@($userdata[$eachuser['login']]['realname'] = $allrealnames[$eachuser['login']]);
@($userdata[$eachuser['login']]['address'] = $alladdress[$eachuser['login']]);
@($userdata[$eachuser['login']]['email'] = $allemails[$eachuser['login']]);
//openpayz payment ID
if ($altcfg['OPENPAYZ_REALID']) {
@($userdata[$eachuser['login']]['payid'] = $allopcustomers[$eachuser['login']]);
} else {
@($userdata[$eachuser['login']]['payid'] = ip2int($eachuser['IP']));
}
//traffic params
$userdata[$eachuser['login']]['traffic'] = $eachuser['D0'] + $eachuser['U0'];
$userdata[$eachuser['login']]['trafficdown'] = $eachuser['D0'];
$userdata[$eachuser['login']]['trafficup'] = $eachuser['U0'];
//net params
$userdata[$eachuser['login']]['ip'] = $eachuser['IP'];
@($userdata[$eachuser['login']]['mac'] = $multinetdata[$eachuser['IP']]['mac']);
@($userdata[$eachuser['login']]['netid'] = $multinetdata[$eachuser['IP']]['netid']);
@($userdata[$eachuser['login']]['hostid'] = $multinetdata[$eachuser['IP']]['id']);
//nas data
@($usernas = zb_NasGetParams($multinetdata[$eachuser['IP']]['netid'], $allnasdata));
@($userdata[$eachuser['login']]['nasid'] = $usernas['id']);
@($userdata[$eachuser['login']]['nasip'] = $usernas['nasip']);
@($userdata[$eachuser['login']]['nasname'] = $usernas['nasname']);
@($userdata[$eachuser['login']]['nastype'] = $usernas['nastype']);
if (isset($tariffspeeds[$eachuser['Tariff']])) {
$userdata[$eachuser['login']]['speeddown'] = $tariffspeeds[$eachuser['Tariff']]['speeddown'];
$userdata[$eachuser['login']]['speedup'] = $tariffspeeds[$eachuser['Tariff']]['speedup'];
} else {
//if no tariff speed defined zero speed by default
$userdata[$eachuser['login']]['speeddown'] = 0;
$userdata[$eachuser['login']]['speedup'] = 0;
}
//CF data
$usercfdata = zb_cfGetContent($eachuser['login'], $allcfdata);
if (!empty($usercfdata)) {
foreach ($usercfdata as $cd => $eachcf) {
$userdata[$eachuser['login']]['cf'][$cd] = $eachcf;
}
}
//passport data
@($userdata[$eachuser['login']]['birthdate'] = $allpdata[$eachuser['login']]['birthdate']);
@($userdata[$eachuser['login']]['passportnum'] = $allpdata[$eachuser['login']]['passportnum']);
@($userdata[$eachuser['login']]['passportdate'] = $allpdata[$eachuser['login']]['passportdate']);
@($userdata[$eachuser['login']]['passportwho'] = $allpdata[$eachuser['login']]['passportwho']);
@($userdata[$eachuser['login']]['pcity'] = $allpdata[$eachuser['login']]['pcity']);
@($userdata[$eachuser['login']]['pstreet'] = $allpdata[$eachuser['login']]['pstreet']);
@($userdata[$eachuser['login']]['pbuild'] = $allpdata[$eachuser['login']]['pbuild']);
@($userdata[$eachuser['login']]['papt'] = $allpdata[$eachuser['login']]['papt']);
}
}
return $userdata;
}
开发者ID:carriercomm,项目名称:Ubilling,代码行数:90,代码来源:api.templatize.php
示例9: web_CardShowBrutes
/**
* Returns payment card brutes attempts list
*
* @return string
*/
function web_CardShowBrutes()
{
$query = "SELECT * from `cardbrute`";
$allbrutes = simple_queryall($query);
$cells = wf_TableCell(__('ID'));
$cells .= wf_TableCell(__('Serial number'));
$cells .= wf_TableCell(__('Date'));
$cells .= wf_TableCell(__('Login'));
$cells .= wf_TableCell(__('IP'));
$cells .= wf_TableCell(__('Full address'));
$cells .= wf_TableCell(__('Real Name'));
$rows = wf_TableRow($cells, 'row1');
if (!empty($allbrutes)) {
$allrealnames = zb_UserGetAllRealnames();
$alladdress = zb_AddressGetFulladdresslist();
foreach ($allbrutes as $io => $eachbrute) {
$cleaniplink = wf_JSAlert('?module=cards&cleanip=' . $eachbrute['ip'], web_delete_icon(__('Clean this IP')), __('Removing this may lead to irreparable results'));
$cells = wf_TableCell($eachbrute['id']);
$cells .= wf_TableCell($eachbrute['serial']);
$cells .= wf_TableCell($eachbrute['date']);
$cells .= wf_TableCell(wf_Link('?module=userprofile&username=' . $eachbrute['login'], web_profile_icon() . ' ' . $eachbrute['login']));
$cells .= wf_TableCell($eachbrute['ip'] . ' ' . $cleaniplink);
$cells .= wf_TableCell(@$alladdress[$eachbrute['login']]);
$cells .= wf_TableCell(@$allrealnames[$eachbrute['login']]);
$rows .= wf_TableRow($cells, 'row3');
}
}
$result = wf_TableBody($rows, '100%', 0, 'sortable');
$cleanAllLink = wf_JSAlert('?module=cards&cleanallbrutes=true', wf_img('skins/icon_cleanup.png', __('Cleanup')), 'Are you serious');
show_window(__('Bruteforce attempts') . ' ' . $cleanAllLink, $result);
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:37,代码来源:api.cardpay.php
示例10: zb_RMExportUserbaseCsv
/**
* Exports existing userbase as CSV format
*
* @return void
*/
function zb_RMExportUserbaseCsv()
{
$allusers = zb_UserGetAllStargazerData();
$allrealnames = zb_UserGetAllRealnames();
$alladdress = zb_AddressGetFulladdresslist();
$allcontracts = zb_UserGetAllContracts();
$allmac = array();
$mac_q = "SELECT * from `nethosts`";
$allnh = simple_queryall($mac_q);
if (!empty($allnh)) {
foreach ($allnh as $nh => $eachnh) {
$allmac[$eachnh['ip']] = $eachnh['mac'];
}
}
$result = '';
//options
$delimiter = ";";
$in_charset = 'utf-8';
$out_charset = 'windows-1251';
/////////////////////
if (!empty($allusers)) {
$result .= __('Login') . $delimiter . __('Password') . $delimiter . __('IP') . $delimiter . __('MAC') . $delimiter . __('Tariff') . $delimiter . __('Cash') . $delimiter . __('Credit') . $delimiter . __('Credit expire') . $delimiter . __('Address') . $delimiter . __('Real Name') . $delimiter . __('Contract') . $delimiter . __('AlwaysOnline') . $delimiter . __('Disabled') . $delimiter . __('User passive') . "\n";
foreach ($allusers as $io => $eachuser) {
//credit expirity
if ($eachuser['CreditExpire'] != 0) {
$creditexpire = date("Y-m-d", $eachuser['CreditExpire']);
} else {
$creditexpire = '';
}
//user mac
if (isset($allmac[$eachuser['IP']])) {
$usermac = $allmac[$eachuser['IP']];
} else {
$usermac = '';
}
$result .= $eachuser['login'] . $delimiter . $eachuser['Password'] . $delimiter . $eachuser['IP'] . $delimiter . $usermac . $delimiter . $eachuser['Tariff'] . $delimiter . $eachuser['Cash'] . $delimiter . $eachuser['Credit'] . $delimiter . $creditexpire . $delimiter . @$alladdress[$eachuser['login']] . $delimiter . @$allrealnames[$eachuser['login']] . $delimiter . @$allcontracts[$eachuser['login']] . $delimiter . $eachuser['AlwaysOnline'] . $delimiter . $eachuser['Down'] . $delimiter . $eachuser['Passive'] . "\n";
}
if ($in_charset != $out_charset) {
$result = iconv($in_charset, $out_charset, $result);
}
log_register('DOWNLOAD FILE `userbase.csv`');
// push data for csv handler
header('Content-type: application/ms-excel');
header('Content-Disposition: attachment; filename=userbase.csv');
echo $result;
die;
}
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:53,代码来源:index.php
示例11: ajaxGetData
/**
* Returns JSON reply for jquery datatables with full list of available connection details
*
* @return void
*/
public function ajaxGetData()
{
$query = "SELECT * from `condet`;";
$all = simple_queryall($query);
$alladdress = zb_AddressGetFulladdresslist();
$allrealnames = zb_UserGetAllRealnames();
$allStgData_raw = zb_UserGetAllStargazerData();
$userData = array();
if (!empty($allStgData_raw)) {
foreach ($allStgData_raw as $io => $each) {
$userData[$each['login']] = $each;
}
}
$result = '{
"aaData": [ ';
if (!empty($all)) {
foreach ($all as $io => $each) {
$profileLink = wf_Link('?module=userprofile&username=' . $each['login'], web_profile_icon() . ' ', false);
$profileLink = str_replace('"', '', $profileLink);
$profileLink = str_replace("'", '', $profileLink);
$profileLink = trim($profileLink);
$userAddress = @$alladdress[$each['login']];
$userAddress = str_replace("'", '`', $userAddress);
$userAddress = str_replace('"', '``', $userAddress);
$userAddress = trim($userAddress);
$userRealname = @$allrealnames[$each['login']];
$userRealname = str_replace("'", '`', $userRealname);
$userRealname = str_replace('"', '``', $userRealname);
$userRealname = trim($userRealname);
@($cash = $userData[$each['login']]['Cash']);
@($credit = $userData[$each['login']]['Credit']);
$act = wf_img('skins/icon_active.gif') . __('Yes');
//finance check
if ($cash < '-' . $credit) {
$act = wf_img('skins/icon_inactive.gif') . __('No');
}
$act = str_replace('"', '', $act);
$act = trim($act);
$result .= '
[
"' . $profileLink . $userAddress . '",
"' . $userRealname . '",
"' . @$userData[$each['login']]['IP'] . '",
"' . @$userData[$each['login']]['Tariff'] . '",
"' . $act . '",
"' . $cash . '",
"' . $credit . '",
"' . $each['seal'] . '",
"' . $each['price'] . '",
"' . $each['length'] . '",
"' . 'CREDIT' . '"
],';
}
}
$result = substr($result, 0, -1);
$result .= ']
}';
die($result);
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:64,代码来源:api.condet.php
示例12: loadUserRealnames
/**
* loads all users realnames
*
* @return void
*/
protected function loadUserRealnames()
{
$this->userRealnames = zb_UserGetAllRealnames();
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:9,代码来源:api.assignreport.php
示例13: web_PaymentSearch
function web_PaymentSearch($markers)
{
if (wf_CheckPost(array('searchtable'))) {
if ($_POST['searchtable'] == 'payments') {
$table = 'payments';
}
if ($_POST['searchtable'] == 'corrections') {
$table = 'paymentscorr';
}
} else {
$table = 'payments';
}
$query = "SELECT * from `" . $table . "`";
$query .= $markers;
$altercfg = rcms_parse_ini_file(CONFIG_PATH . "alter.ini");
$csvdata = '';
$allpayments = simple_queryall($query);
if ($altercfg['FINREP_CONTRACT']) {
$allcontracts = zb_UserGetAllContracts();
$allcontracts = array_flip($allcontracts);
}
if ($altercfg['FINREP_TARIFF']) {
$alltariffs = zb_TariffsGetAllUsers();
}
$allrealnames = zb_UserGetAllRealnames();
$alladdress = zb_AddressGetFulladdresslist();
$alltypes = zb_CashGetAllCashTypes();
$allservicenames = zb_VservicesGetAllNamesLabeled();
$allpaysyspercents = zb_PaySysPercentGetAll();
$totalsumm = 0;
$paysyssumm = 0;
$profitsumm = 0;
$totalcount = 0;
$cells = wf_TableCell(__('ID'));
$cells .= wf_TableCell(__('Date'));
$cells .= wf_TableCell(__('Cash'));
$cells .= wf_TableCell(__('PS%'));
$cells .= wf_TableCell(__('Profit'));
$cells .= wf_TableCell(__('Login'));
if ($altercfg['FINREP_CONTRACT']) {
$cells .= wf_TableCell(__('Contract'));
}
$cells .= wf_TableCell(__('Full address'));
$cells .= wf_TableCell(__('Real Name'));
if ($altercfg['FINREP_TARIFF']) {
$cells .= wf_TableCell(__('Tariff'));
}
$cells .= wf_TableCell(__('Payment type'));
$cells .= wf_TableCell(__('Notes'));
$cells .= wf_TableCell(__('Admin'));
$rows = wf_TableRow($cells, 'row1');
if (!empty($allpayments)) {
if ($altercfg['FINREP_TARIFF']) {
$csvTariffColumn = ';' . __('Tariff');
} else {
$csvTariffColumn = '';
}
$csvdata .= __('ID') . ';' . __('Date') . ';' . __('Cash') . ';' . __('PS%') . ';' . __('Profit') . ';' . __('Login') . ';' . __('Full address') . ';' . __('Real Name') . $csvTariffColumn . ';' . __('Payment type') . ';' . __('Notes') . ';' . __('Admin') . "\n";
foreach ($allpayments as $io => $each) {
$cells = wf_TableCell($each['id']);
$cells .= wf_TableCell($each['date']);
$cells .= wf_TableCell($each['summ']);
//detecting paymentsystem and calc percent
if (isset($allpaysyspercents[$each['note']])) {
$currPc = $allpaysyspercents[$each['note']]['percent'];
$rawSumm = $each['summ'];
$paySysPc = $rawSumm / 100 * $currPc;
$ourProfit = $rawSumm - $paySysPc;
} else {
$paySysPc = 0;
$ourProfit = $each['summ'];
}
$cells .= wf_TableCell($paySysPc);
$cells .= wf_TableCell($ourProfit);
$cells .= wf_TableCell(wf_Link('?module=userprofile&username=' . $each['login'], web_profile_icon() . ' ' . $each['login'], false, ''));
if ($altercfg['FINREP_CONTRACT']) {
$cells .= wf_TableCell(@$allcontracts[$each['login']]);
}
@($paymentRealname = $allrealnames[$each['login']]);
@($paymentCashType = __($alltypes[$each['cashtypeid']]));
@($paymentAddress = $alladdress[$each['login']]);
$cells .= wf_TableCell($paymentAddress);
$cells .= wf_TableCell($paymentRealname);
if ($altercfg['FINREP_TARIFF']) {
@($userTariff = $alltariffs[$each['login']]);
$cells .= wf_TableCell($userTariff);
$csvTariff = ';' . $userTariff;
} else {
$csvTariff = '';
}
$cells .= wf_TableCell($paymentCashType);
//payment notes translation
if ($altercfg['TRANSLATE_PAYMENTS_NOTES']) {
$paynote = zb_TranslatePaymentNote($each['note'], $allservicenames);
} else {
$paynote = $each['note'];
}
$cells .= wf_TableCell($paynote);
$cells .= wf_TableCell($each['admin']);
$rows .= wf_TableRow($cells, 'row3');
//.........这里部分代码省略.........
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:101,代码来源:index.php
示例14: web_UserArrayShower
/**
* Returns user array in table view
*
* @global object $ubillingConfig
* @param array $usersarr
* @return string
*/
function web_UserArrayShower($usersarr)
{
global $ubillingConfig;
$alterconf = $ubillingConfig->getAlter();
if (!empty($usersarr)) {
$alladdress = zb_AddressGetFulladdresslistCached();
$allrealnames = zb_UserGetAllRealnames();
$alltariffs = zb_TariffsGetAllUsers();
$allusercash = zb_CashGetAllUsers();
$allusercredits = zb_CreditGetAllUsers();
$alluserips = zb_UserGetAllIPs();
if ($alterconf['ONLINE_LAT']) {
$alluserlat = zb_LatGetAllUsers();
}
//additional finance links
if ($alterconf['FAST_CASH_LINK']) {
$fastcash = true;
} else {
$fastcash = false;
}
$tablecells = wf_TableCell(__('Login'));
$tablecells .= wf_TableCell(__('Address'));
$tablecells .= wf_TableCell(__('Real Name'));
$tablecells .= wf_TableCell(__('IP'));
$tablecells .= wf_TableCell(__('Tariff'));
// last activity time
if ($alterconf['ONLINE_LAT']) {
$tablecells .= wf_TableCell(__('LAT'));
}
$tablecells .= wf_TableCell(__('Active'));
//online detect
if ($alterconf['DN_ONLINE_DETECT']) {
$tablecells .= wf_TableCell(__('Users online'));
}
$tablecells .= wf_TableCell(__('Balance'));
$tablecells .= wf_TableCell(__('Credit'));
$tablerows = wf_TableRow($tablecells, 'row1');
foreach ($usersarr as $eachlogin) {
@($usercash = $allusercash[$eachlogin]);
@($usercredit = $allusercredits[$eachlogin]);
//finance check
$activity = web_green_led();
$activity_flag = 1;
if ($usercash < '-' . $usercredit) {
$activity = web_red_led();
$activity_flag = 0;
}
//fast cash link
if ($fastcash) {
$financelink = wf_Link('?module=addcash&username=' . $eachlogin, wf_img('skins/icon_dollar.gif', __('Finance operations')), false, '');
} else {
$financelink = '';
}
$profilelink = $financelink . wf_Link('?module=userprofile&username=' . $eachlogin, web_profile_icon() . ' ' . $eachlogin);
$tablecells = wf_TableCell($profilelink);
$tablecells .= wf_TableCell(@$alladdress[$eachlogin]);
$tablecells .= wf_TableCell(@$allrealnames[$eachlogin]);
$tablecells .= wf_TableCell(@$alluserips[$eachlogin], '', '', 'sorttable_customkey="' . ip2int(@$alluserips[$eachlogin]) . '"');
$tablecells .= wf_TableCell(@$alltariffs[$eachlogin]);
if ($alterconf['ONLINE_LAT']) {
if (isset($alluserlat[$eachlogin])) {
$cUserLat = date("Y-m-d H:i:s", $alluserlat[$eachlogin]);
} else {
$cUserLat = __('No');
}
$tablecells .= wf_TableCell($cUserLat);
}
$tablecells .= wf_TableCell($activity, '', '', 'sorttable_customkey="' . $activity_flag . '"');
if ($alterconf['DN_ONLINE_DETECT']) {
if (file_exists(DATA_PATH . 'dn/' . $eachlogin)) {
$online_flag = 1;
} else {
$online_flag = 0;
}
$tablecells .= wf_TableCell(web_bool_star($online_flag), '', '', 'sorttable_customkey="' . $online_flag . '"');
}
$tablecells .= wf_TableCell($usercash);
$tablecells .= wf_TableCell($usercredit);
$tablerows .= wf_TableRow($tablecells, 'row3');
}
$result = wf_TableBody($tablerows, '100%', '0', 'sortable');
$result .= wf_tag('b') . __('Total') . ': ' . wf_tag('b', true) . sizeof($usersarr);
} else {
$result = __('Any users found');
}
return $result;
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:94,代码来源:api.workaround.php
示例15: renderAll
public function renderAll($cutdata = false)
{
$alladdress = zb_AddressGetFulladdresslist();
$allrealnames = zb_UserGetAllRealnames();
$userCounter = 0;
$cells = '';
if (!$cutdata) {
$cells .= wf_TableCell(__('Login'));
}
$cells .=
|
请发表评论