本文整理汇总了PHP中wf_modal函数的典型用法代码示例。如果您正苦于以下问题:PHP wf_modal函数的具体用法?PHP wf_modal怎么用?PHP wf_modal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wf_modal函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: show_help
function show_help($module = '')
{
global $system;
$result = '';
if (empty($module)) {
$module = get('module', 'index');
}
$lang = curlang();
$help_dir = DATA_PATH . 'help/' . $lang . '/';
if (LOGGED_IN) {
if ($system->checkForRight('HELP')) {
$admin_link = '
<a href="' . RCMS_ROOT_PATH . '?module=help&edit=' . $module . '"><img title="' . __('Edit') . '" src="' . IMAGES_PATH . 'skins/edit_small.gif"></a>
<a href="#" onClick="if(confirm(\'' . __('Delete') . ': \\n' . str_replace('"', '″', $module) . '?\\n\')) document.location.href = \'' . RCMS_ROOT_PATH . '?module=help&delete=' . $module . '\'">
<img title="' . __('Delete') . '" src="' . IMAGES_PATH . 'skins/trash_small.gif">
</a><br/>
';
$add_link = '<a href="' . RCMS_ROOT_PATH . '?module=help&edit=' . $module . '"><img src="' . IMAGES_PATH . 'skins/add_help.png" title="' . __('Add') . ' ' . __('Help') . '" alt="' . __('Add') . ' ' . __('Help') . '" /></a> ';
} else {
$admin_link = '';
$add_link = '';
}
$modulename = $help_dir . make_safe_filename($module);
if (file_exists($modulename)) {
$help_chapter = file_get_contents($modulename);
$result = wf_modal(wf_img(IMAGES_PATH . 'skins/help.png', __('Context help')), __('Context help'), $admin_link . $help_chapter, '', '600', '300', 'accesskey="h"');
} else {
$result = $add_link;
}
}
return $result;
}
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:32,代码来源:api.astral.php
示例2: dhcp_show_templates
function dhcp_show_templates()
{
$allTemplates = rcms_scandir(CONFIG_PATH . 'dhcp/');
$result = '';
if (!empty($allTemplates)) {
foreach ($allTemplates as $each) {
$templateData = file_get_contents(CONFIG_PATH . 'dhcp/' . $each);
$templateData = nl2br($templateData);
$result .= wf_modal($each, $each, $templateData, 'ubButton', 800, 600);
}
} else {
$result = __('Nothing found');
}
show_window(__('Global templates'), $result);
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:15,代码来源:index.php
示例3: web_HelpIconShow
/**
* Shows help icon if context chapter available for current language
*
* @return string
*/
function web_HelpIconShow()
{
$lang = curlang();
$result = '';
if (cfr('HELP')) {
if (isset($_GET['module'])) {
$modulename = vf($_GET['module']);
if (file_exists(DATA_PATH . "help/" . $lang . "/" . $modulename)) {
$help_chapter = web_HelpChapterGet($modulename);
$result = wf_modal(wf_img_sized("skins/help.gif", __('Context help'), 20), __('Context help'), $help_chapter, '', '600', '300');
}
}
}
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:20,代码来源:api.help.php
示例4: userProfile
/**
* returns some existing user profile
*
* @param int $userid existing user`s ID
*
* @return string
*/
public function userProfile($userid)
{
$userid = vf($userid, 3);
if (isset($this->users[$userid])) {
$userData = $this->users[$userid];
$rows = '';
//zero apt numbers as private builds
if ($this->altCfg['ZERO_TOLERANCE']) {
$apt = $userData['apt'] == '0' ? '' : '/' . $userData['apt'];
} else {
$apt = '/' . $userData['apt'];
}
//photostorage integration
if ($this->altCfg['PHOTOSTORAGE_ENABLED']) {
$photoControl = wf_Link(self::URL_PHOTOSTORAGE . $userid, wf_img_sized('skins/photostorage.png', __('Upload images'), '10'), false);
} else {
$photoControl = '';
}
//additional user comments
if ($this->altCfg['ADCOMMENTS_ENABLED']) {
$adcomments = new ADcomments('UKVUSERPROFILE');
}
//task creation control
if ($this->altCfg['CREATETASK_IN_PROFILE']) {
$shortAddress = $userData['street'] . ' ' . $userData['build'] . $apt;
$taskForm = ts_TaskCreateFormUnified($shortAddress, $userData['mobile'], $userData['phone'], '');
$taskControl = wf_modal(wf_img('skins/createtask.gif', __('Create task')), __('Create task'), $taskForm, '', '420', '500');
} else {
$taskControl = '';
}
$cells = wf_TableCell(__('Full address') . ' ' . $taskControl, '20%', 'row2');
$cells .= wf_TableCell($userData['city'] . ' ' . $userData['street'] . ' ' . $userData['build'] . $apt);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Real Name') . ' ' . $photoControl, '20%', 'row2');
$cells .= wf_TableCell($userData['realname']);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Phone'), '20%', 'row2');
$cells .= wf_TableCell($userData['phone']);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Mobile'), '20%', 'row2');
$cells .= wf_TableCell($userData['mobile']);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(wf_tag('b') . __('Contract') . wf_tag('b', true), '20%', 'row2');
$cells .= wf_TableCell(wf_tag('b') . $userData['contract'] . wf_tag('b', true));
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Tariff'), '20%', 'row2');
$cells .= wf_TableCell(@$this->tariffs[$userData['tariffid']]['tariffname']);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(wf_tag('b') . __('Cash') . wf_tag('b', true), '20%', 'row2');
$cells .= wf_TableCell(wf_tag('b') . $userData['cash'] . wf_tag('b', true));
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Connected'), '20%', 'row2');
$cells .= wf_TableCell(web_bool_led($userData['active']));
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('User contract date'), '20%', 'row2');
$cells .= wf_TableCell($userData['regdate']);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Internet account'), '20%', 'row2');
$inetLink = !empty($userData['inetlogin']) ? wf_Link(self::URL_INET_USER_PROFILE . $userData['inetlogin'], web_profile_icon() . ' ' . $userData['inetlogin'], false, '') : '';
$cells .= wf_TableCell($inetLink);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Cable seal'), '20%', 'row2');
$cells .= wf_TableCell($userData['cableseal']);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Notes'), '20%', 'row2');
$cells .= wf_TableCell($userData['notes']);
$rows .= wf_TableRow($cells, 'row3');
$profileData = wf_TableBody($rows, '100%', 0, '');
$profilePlugins = '';
if (cfr('UKV')) {
$profilePlugins .= wf_tag('div', false, 'dashtask', 'style="height:75px; width:75px;"') . wf_modal(wf_img('skins/icon_orb_big.gif', __('User lifestory')), __('User lifestory'), $this->userLifeStoryForm($userid), '', '800', '600') . __('Details') . wf_tag('div', true);
}
if (cfr('UKVCASH')) {
$profilePlugins .= wf_tag('div', false, 'dashtask', 'style="height:75px; width:75px;"') . wf_modal(wf_img('skins/ukv/money.png', __('Cash')), __('Finance operations'), $this->userManualPaymentsForm($userid), '', '600', '250') . __('Cash') . wf_tag('div', true);
}
if (cfr('UKVREG')) {
$profilePlugins .= wf_tag('div', false, 'dashtask', 'style="height:75px; width:75px;"') . wf_modalAuto(wf_img('skins/ukv/useredit.png', __('Edit user')), __('Edit user'), $this->userEditForm($userid), '') . __('Edit') . wf_tag('div', true);
}
if (cfr('UKVSEAL')) {
$profilePlugins .= wf_tag('div', false, 'dashtask', 'style="height:75px; width:75px;"') . wf_modalAuto(wf_img('skins/ukv/cableseal.png', __('Cable seal')), __('Cable seal'), $this->userCableSealForm($userid), '') . __('Cable seal') . wf_tag('div', true);
}
if (cfr('UKVDEL')) {
$profilePlugins .= wf_tag('div', false, 'dashtask', 'style="height:75px; width:75px;"') . wf_modal(wf_img('skins/annihilation.gif', __('Deleting user')), __('Deleting user'), $this->userDeletionForm($userid), '', '800', '300') . __('Delete') . wf_tag('div', true);
}
//main view construction
$profilecells = wf_tag('td', false, '', 'valign="top"') . $profileData . wf_tag('td', true);
$profilerows = wf_TableRow($profilecells);
$profilecells = wf_tag('td', false, '', 'width="128" valign="top"') . $profilePlugins . wf_tag('td', true);
$profilerows .= wf_TableRow($profilecells);
$result = wf_TableBody($profilerows, '100%', '0');
$result .= $this->userPaymentsRender($userid);
//additional user comments
if ($this->altCfg['ADCOMMENTS_ENABLED']) {
//.........这里部分代码省略.........
开发者ID:carriercomm,项目名称:Ubilling,代码行数:101,代码来源:api.ukv.php
示例5: zb_NasAdd
if (!empty($newnasip) and !empty($newnasname)) {
zb_NasAdd($newnetid, $newnasip, $newnasname, $newnastype, $newbandw);
zb_NasConfigSave();
rcms_redirect("?module=nas");
}
}
// Show available NASes
$allnas = zb_NasGetAllData();
// construct needed editor
$titles = array('ID', 'Network', 'IP', 'NAS name', 'NAS type', 'Bandwidthd URL');
$keys = array('id', 'netid', 'nasip', 'nasname', 'nastype', 'bandw');
if (!wf_CheckGet(array('edit'))) {
$altCfg = $ubillingConfig->getAlter();
if ($altCfg['FREERADIUS_ENABLED']) {
$freeRadiusClientsData = web_FreeRadiusListClients();
$radiusControls = wf_modal(web_icon_extended(__('FreeRADIUS NAS parameters')), __('FreeRADIUS NAS parameters'), $freeRadiusClientsData, '', '600', '300');
} else {
$radiusControls = '';
}
show_window(__('Network Access Servers') . ' ' . $radiusControls, web_GridEditorNas($titles, $keys, $allnas, 'nas'));
show_window(__('Add new'), web_NasAddForm());
//vlangen patch start
if ($altCfg['VLANGEN_SUPPORT']) {
$terminator = new VlanTerminator();
if (isset($_GET['DeleteTerminator'])) {
$TermID = $_GET['DeleteTerminator'];
$terminator->delete($TermID);
rcms_redirect(VlanTerminator::MODULE_URL);
}
if (!isset($_GET['EditTerminator'])) {
if (isset($_POST['AddTerminator'])) {
开发者ID:nightflyza,项目名称:Ubilling,代码行数:31,代码来源:index.php
示例6: web_BuildLister
/**
* Returns build lister with controls for some streetID
*
* @global array $ubillingConfig
* @param int $streetid
* @return string
*/
function web_BuildLister($streetid)
{
global $ubillingConfig;
$altcfg = $ubillingConfig->getAlter();
$allbuilds = zb_AddressGetBuildAllDataByStreet($streetid);
$cells = wf_TableCell(__('ID'));
$cells .= wf_TableCell(__('Building number'));
$cells .= wf_TableCell(__('Geo location'));
$cells .= wf_TableCell(__('Actions'));
$rows = wf_TableRow($cells, 'row1');
if (!empty($allbuilds)) {
//build passport data processing
if ($altcfg['BUILD_EXTENDED']) {
$buildPassport = new BuildPassport();
}
foreach ($allbuilds as $io => $eachbuild) {
$cells = wf_TableCell($eachbuild['id']);
$cells .= wf_TableCell($eachbuild['buildnum']);
$cells .= wf_TableCell($eachbuild['geo']);
$acts = wf_JSAlert('?module=builds&action=delete&streetid=' . $streetid . '&buildid=' . $eachbuild['id'], web_delete_icon(), 'Removing this may lead to irreparable results');
$acts .= '' . wf_JSAlert('?module=builds&action=editbuild&streetid=' . $streetid . '&buildid=' . $eachbuild['id'], web_edit_icon(), 'Are you serious');
if (!empty($eachbuild['geo'])) {
$acts .= ' ' . wf_Link("?module=usersmap&findbuild=" . $eachbuild['geo'], wf_img('skins/icon_search_small.gif', __('Find on map')), false);
}
if ($altcfg['BUILD_EXTENDED']) {
$acts .= ' ' . wf_modal(wf_img('skins/icon_passport.gif', __('Build passport')), __('Build passport'), $buildPassport->renderEditForm($eachbuild['id']), '', '600', '450');
}
$cells .= wf_TableCell($acts);
$rows .= wf_TableRow($cells, 'row3');
}
}
$result = wf_TableBody($rows, '100%', 0, 'sortable');
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:41,代码来源:api.address.php
示例7: getExtNetsControls
/**
* extended network pools controller
*
* @return string
*/
protected function getExtNetsControls()
{
$result = '';
if ($this->alterCfg['NETWORKS_EXT']) {
$extNets = new ExtNets();
//pool linking controller
if (wf_CheckPost(array('extnetspoollinkid', 'extnetspoollinklogin'))) {
$extNets->poolLinkLogin($_POST['extnetspoollinkid'], $_POST['extnetspoollinklogin']);
rcms_redirect('?module=userprofile&username=' . $_POST['extnetspoollinklogin']);
}
$result = $extNets->poolsExtractByLogin($this->login);
$result .= ' ' . wf_modal(wf_img('skins/icon_ip.gif'), __('IP associated with pool'), $extNets->poolLinkingForm($this->login), '', '500', '120');
}
return $result;
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:20,代码来源:api.userprofile.php
示例8: rcms_redirect
//creating of new timesheet
if (wf_CheckPost(array('newtimesheet', 'newtimesheetdate', '_employeehours'))) {
$tsSheetCreateResult = $salary->timesheetCreate();
if ($tsSheetCreateResult == 0) {
//succeful creation
rcms_redirect('?module=salary_timesheets');
} else {
if ($tsSheetCreateResult == 1) {
//date duplicate
show_error(__('Timesheets with that date already exist'));
}
}
}
$tsCf = $salary->timesheetCreateForm();
if ($tsCf) {
$timesheetsControls = wf_modal(web_add_icon() . ' ' . __('Create'), __('Create') . ' ' . __('Timesheet'), $tsCf, 'ubButton', '800', '600');
show_window('', $timesheetsControls);
if (!wf_CheckGet(array('showdate'))) {
//render available timesheets list by date
show_window(__('Timesheets'), $salary->timesheetsListRender('?module=salary_timesheets'));
} else {
//saving changes for single timesheet row
if (wf_CheckPost(array('edittimesheetid'))) {
$salary->timesheetSaveChanges();
rcms_redirect('?module=salary_timesheets&showdate=' . $_GET['showdate']);
}
//render timesheet by date (edit form)
show_window(__('Timesheet') . ' ' . $_GET['showdate'], $salary->timesheetEditForm($_GET['showdate']));
show_window('', wf_Link('?module=salary_timesheets', __('Back'), false, 'ubButton'));
}
} else {
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php
示例9: zb_AskoziaParseCallHistory
function zb_AskoziaParseCallHistory($data)
{
global $altcfg;
$normalData = array();
$callersData = array();
$data = explodeRows($data);
if (!empty($data)) {
foreach ($data as $eachline) {
$explode = explode(';', $eachline);
//in 2.2.8 delimiter changed from ," to ;
if (!empty($eachline)) {
$normalData[] = str_replace('"', '', $explode);
}
}
}
//custom caller options
if (isset($altcfg['ASKOZIA_CUSTOM'])) {
if (!empty($altcfg['ASKOZIA_CUSTOM'])) {
// 0 - internal peers
// 1 - external gateways
// 2 - group prefix
// 3 - parking
$customCfg = explode(',', $altcfg['ASKOZIA_CUSTOM']);
} else {
$customCfg = array();
}
} else {
$customCfg = array();
}
if (!empty($normalData)) {
$totalTime = 0;
$callsCounter = 0;
$answerCounter = 0;
$noAnswerCounter = 0;
$chartData = array();
$cells = wf_TableCell('#');
$cells .= wf_TableCell(__('Time'));
$cells .= wf_TableCell(__('From'));
$cells .= wf_TableCell(__('To'));
$cells .= wf_TableCell(__('Picked up'));
$cells .= wf_TableCell(__('Type'));
$cells .= wf_TableCell(__('Status'));
$cells .= wf_TableCell(__('Talk time'));
$rows = wf_TableRow($cells, 'row1');
foreach ($normalData as $io => $each) {
//fix parsing for askozia 2.2.8
if ($each[0] != 'accountcode') {
$callsCounter++;
$debugData = wf_tag('pre') . print_r($each, true) . wf_tag('pre', true);
$startTime = explode(' ', $each[9]);
@($startDate = $startTime[0]);
@($startTime = $startTime[1]);
@($startHour = date("H:00:00", strtotime($startTime)));
$endTime = explode(' ', $each[11]);
@($endTime = $endTime[1]);
$answerTime = explode(' ', $each[10]);
@($answerTime = $answerTime[1]);
$tmpStats = __('Taken up the phone') . ': ' . $answerTime . "\n";
$tmpStats .= __('End of call') . ': ' . $endTime;
$sessionTimeStats = wf_tag('abbr', false, '', 'title="' . $tmpStats . '"');
$sessionTimeStats .= $startTime;
$sessionTimeStats .= wf_tag('abbr', true);
$callDirection = '';
//detectiong direction icon
if (!empty($customCfg)) {
if (isset($customCfg[0]) and $customCfg[1]) {
if (zb_AskoziaCheckPrefix($customCfg[0], $each[1])) {
$callDirection = wf_img('skins/calls/outgoing.png') . ' ';
}
if (zb_AskoziaCheckPrefix($customCfg[1], $each[1])) {
$callDirection = wf_img('skins/calls/incoming.png') . ' ';
}
}
}
$cells = wf_TableCell(wf_modal($callsCounter, $callsCounter, $debugData, '', '500', '600'), '', '', 'sorttable_customkey="' . $callsCounter . '"');
$cells .= wf_TableCell($callDirection . $sessionTimeStats, '', '', 'sorttable_customkey="' . strtotime($each[9]) . '"');
$cells .= wf_TableCell(zb_AskoziaGetNumAlias($each[1]));
$cells .= wf_TableCell(zb_AskoziaGetNumAlias($each[2]));
$receiveCid = '';
if (!empty($each[6])) {
$tmpRcid = explode('-', $each[6]);
@($receiveCid = vf($tmpRcid[0], 3));
}
$cells .= wf_TableCell(zb_AskoziaGetNumAlias($receiveCid));
$CallType = __('Dial');
if (ispos($each[3], 'internal-caller-transfer')) {
$CallType = __('Call transfer');
}
if (ispos($each[7], 'VoiceMail')) {
$CallType = __('Voice mail');
}
$cells .= wf_TableCell($CallType);
$callStatus = $each[14];
$statusIcon = '';
if (ispos($each[14], 'ANSWERED')) {
$callStatus = __('Answered');
$statusIcon = wf_img('skins/calls/phone_green.png');
$answerCounter++;
if (isset($chartData[$startDate . ' ' . $startHour]['answered'])) {
$chartData[$startDate . ' ' . $startHour]['answered']++;
//.........这里部分代码省略.........
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:101,代码来源:index.php
示例10: panel
/**
* returns module control panel
*
* @return string
*/
protected function panel()
{
$result = wf_Link('?module=report_finance', __('Back'), false, 'ubButton');
$result .= wf_modal(__('Settings'), __('Settings'), $this->configForm(), 'ubButton', '700', '200');
return $result;
}
开发者ID:carriercomm,项目名称:Ubilling,代码行数:11,代码来源:index.php
示例11: showRequest
/**
* shows selected signup request by its ID
*
* @param int $requid Existing signup request ID
*
* @return void
*/
public function showRequest($reqid)
{
$requid = vf($reqid, 3);
$reqdata = $this->getData($reqid);
if (empty($reqdata['apt'])) {
$apt = 0;
} else {
$apt = $reqdata['apt'];
}
$shortaddress = $reqdata['street'] . ' ' . $reqdata['build'] . '/' . $apt;
$taskCreateControls = wf_modal(wf_img('skins/createtask.gif', __('Create task')), __('Create task'), ts_TaskCreateFormSigreq($shortaddress, $reqdata['phone']), '', '420', '500');
$cells = wf_TableCell(__('Date'));
$cells .= wf_TableCell($reqdata['date'] . ' ' . $taskCreateControls);
$rows = wf_TableRow($cells, 'row3');
$whoislink = self::URL_WHOIS . $reqdata['ip'];
$iplookup = wf_Link($whoislink, $reqdata['ip'], false, '');
$cells = wf_TableCell(__('IP'));
$cells .= wf_TableCell($iplookup);
$rows .= wf_TableRow($cells, 'row3');
$reqAddress = $reqdata['street'] . ' ' . $reqdata['build'] . '/' . $apt;
//Construct capability create form if enabled
if ($this->altcfg['CAPABDIR_ENABLED']) {
$capabDir = new CapabilitiesDirectory(true);
$capabCreateForm = $capabDir->createForm($reqAddress, $reqdata['phone'], $reqdata['service'] . ' ' . $reqdata['notes']);
$capabControl = wf_modal(wf_img_sized('skins/icon_cake.png', __('Available connection capabilities'), 10), __('Create connection capability'), $capabCreateForm, '', '400', '300');
} else {
$capabControl = '';
}
$cells = wf_TableCell(__('Full address'));
$cells .= wf_TableCell($reqAddress . ' ' . $capabControl);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Real Name'));
$cells .= wf_TableCell($reqdata['realname']);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Phone'));
$cells .= wf_TableCell($reqdata['phone']);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Service'));
$cells .= wf_TableCell($reqdata['service']);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Processed'));
$cells .= wf_TableCell(web_bool_led($reqdata['state']));
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Notes'));
$notes = nl2br($reqdata['notes']);
$notes = str_replace('Tariff:', __('Tariff') . ':', $notes);
$notes = str_replace('Email:', __('Email') . ':', $notes);
$cells .= wf_TableCell($notes);
$rows .= wf_TableRow($cells, 'row3');
$result = wf_TableBody($rows, '100%', '0', 'glamour');
$actlinks = wf_Link('?module=sigreq', __('Back'), false, 'ubButton');
if ($reqdata['state'] == 0) {
$actlinks .= wf_Link('?module=sigreq&reqdone=' . $reqid, wf_img_sized('skins/icon_active.gif', '', '10') . ' ' . __('Close'), false, 'ubButton');
} else {
$actlinks .= wf_Link('?module=sigreq&requndone=' . $reqid, wf_img_sized('skins/icon_inactive.gif', '', '10') . ' ' . __('Open'), false, 'ubButton');
}
$deletelink = ' ' . wf_JSAlert("?module=sigreq&deletereq=" . $reqid, web_delete_icon(), 'Are you serious');
show_window(__('Signup request') . ': ' . $reqid . $deletelink, $result);
show_window('', $actlinks);
//additional comments
if ($this->altcfg['ADCOMMENTS_ENABLED']) {
$adcomments = new ADcomments('SIGREQ');
show_window(__('Additional comments'), $adcomments->renderComments($requid));
}
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:72,代码来源:api.sigreq.php
示例12: zb_AsteriskParseCDR
function zb_AsteriskParseCDR($data)
{
global $altcfg;
$normalData = $data;
if (!empty($normalData)) {
$totalTime = 0;
$callsCounter = 0;
$cells = wf_TableCell('#');
$cells .= wf_TableCell(__('Time'));
$cells .= wf_TableCell(__('From'));
$cells .= wf_TableCell(__('To'));
$cells .= wf_TableCell(__('Type'));
$cells .= wf_TableCell(__('Status'));
$cells .= wf_TableCell(__('Talk time'));
$rows = wf_TableRow($cells, 'row1');
foreach ($normalData as $io => $each) {
$callsCounter++;
$debugData = wf_tag('pre') . print_r($each, true) . wf_tag('pre', true);
$startTime = explode(' ', $each['calldate']);
@($startTime = $startTime[1]);
$tmpTime = strtotime($each['calldate']);
$endTime = $tmpTime + $each['duration'];
$endTime = date("H:i:s", $endTime);
$answerTime = $tmpTime + ($each['duration'] - $each['billsec']);
$answerTime = date("H:i:s", $answerTime);
$tmpStats = __('Taken up the phone') . ': ' . $answerTime . "\n";
$tmpStats .= __('End of call') . ': ' . $endTime;
$sessionTimeStats = wf_tag('abbr', false, '', 'title="' . $tmpStats . '"');
$sessionTimeStats .= $startTime;
$sessionTimeStats .= wf_tag('abbr', true);
$callDirection = '';
$cells = wf_TableCell(wf_modal($callsCounter, $callsCounter, $debugData, '', '500', '600'), '', '', 'sorttable_customkey="' . $callsCounter . '"');
$cells .= wf_TableCell($sessionTimeStats, '', '', 'sorttable_customkey="' . $tmpTime . '"');
$cells .= wf_TableCell(zb_AsteriskGetNumAlias($each['src']));
$cells .= wf_TableCell(zb_AsteriskGetNumAlias($each['dst']));
$CallType = __('Dial');
if (ispos($each['lastapp'], 'internal-caller-transfer')) {
$CallType = __('Call transfer');
}
$cells .= wf_TableCell($CallType);
$callStatus = $each['disposition'];
$statusIcon = '';
if (ispos($each['disposition'], 'ANSWERED')) {
$callStatus = __('Answered');
$statusIcon = wf_img('skins/calls/phone_green.png');
}
if (ispos($each['disposition'], 'NO ANSWER')) {
$callStatus = __('No answer');
$statusIcon = wf_img('skins/calls/phone_red.png');
}
if (ispos($each['disposition'], 'BUSY')) {
$callStatus = __('Busy');
$statusIcon = wf_img('skins/calls/phone_yellow.png');
}
if (ispos($each['disposition'], 'FAILED')) {
$callStatus = __('Failed');
$statusIcon = wf_img('skins/calls/phone_fail.png');
}
$cells .= wf_TableCell($statusIcon . ' ' . $callStatus);
$speekTime = $each['billsec'];
$totalTime = $totalTime + $each['billsec'];
$speekTime = zb_AsteriskFormatTime($speekTime);
$cells .= wf_TableCell($speekTime, '', '', 'sorttable_customkey="' . $each['billsec'] . '"');
$rows .= wf_TableRow($cells, 'row3');
}
$result = wf_TableBody($rows, '100%', '0', 'sortable');
$result .= __('Time spent on calls') . ': ' . zb_AsteriskFormatTime($totalTime) . wf_tag('br');
$result .= __('Total calls') . ': ' . $callsCounter;
show_window('', $result);
}
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:71,代码来源:index.php
示例13: foreach
if (!empty($menu_points)) {
foreach ($menu_points as $point => $menus) {
$system->setCurrentPoint($point);
if (!empty($menus) && isset($skin['menu_point'][$point])) {
foreach ($menus as $menu) {
if (substr($menu, 0, 4) == 'ucm:' && is_readable(DF_PATH . substr($menu, 4) . '.ucm')) {
$file = file(DF_PATH . substr($menu, 4) . '.ucm');
$title = preg_replace("/[\n\r]+/", '', $file[0]);
$align = preg_replace("/[\n\r]+/", '', $file[1]);
unset($file[0]);
unset($file[1]);
show_window($title, implode('', $file), $align);
} elseif (!empty($system->modules['menu'][$menu])) {
$module = $menu;
$module_dir = MODULES_PATH . $menu;
require MODULES_PATH . $menu . '/index.php';
} else {
show_window('', __('Module not found'), 'center');
}
}
}
}
}
if (XHPROF) {
$xhprof_data = xhprof_disable();
$xhprof_runs = new XHProfRuns_Default();
$xhprof_run_id = $xhprof_runs->save_run($xhprof_data, "xhprof_ubilling");
$xhprof_link = wf_modal('XHPROF', 'XHPROF DEBUG DATA', '<iframe src="xhprof/xhprof_html/index.php?run=' . $xhprof_run_id . '&source=xhprof_ubilling" width="100%" height="750"></iframe>', '', '1024', '768');
}
// Start output
require_once CUR_SKIN_PATH . 'skin.general.php';
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php
示例14: panel
/**
* Shows watchdog control panel
*
* @return string
*/
public function panel()
{
$createWindow = $this->newTaskForm();
$settingsWindow = $this->settingsForm();
$result = wf_modal(wf_img('skins/add_icon.png') . ' ' . __('Create new task'), __('Create new task'), $createWindow, 'ubButton', '400', '300');
$result .= wf_Link("?module=watchdog", wf_img('skins/icon_search_small.gif') . ' ' . __('Show all tasks'), false, 'ubButton');
$result .= wf_Link("?module=watchdog&manual=true", wf_img('skins/refresh.gif') . ' ' . __('Manual run'), false, 'ubButton');
$result .= wf_Link("?module=watchdog&previousalerts=true", wf_img('skins/time_machine.png') . ' ' . __('Previous alerts'), false, 'ubButton');
$result .= wf_modalAuto(wf_img('skins/settings.png') . ' ' . __('Settings'), __('Settings'), $settingsWindow, 'ubButton');
return $result;
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:16,代码来源:api.watchdog.php
示例15: ub_SwitchModelAdd
if (cfr('SWITCHM')) {
//creatin new model
if (wf_CheckPost(array('newsm'))) {
ub_SwitchModelAdd($_POST['newsm'], $_POST['newsmp'], $_POST['newsst']);
rcms_redirect("?module=switchmodels");
}
//deleting existing model
if (isset($_GET['deletesm'])) {
if (!empty($_GET['deletesm'])) {
ub_SwitchModelDelete($_GET['deletesm']);
rcms_redirect("?module=switchmodels");
}
}
//listing available models
if (!isset($_GET['edit'])) {
$navlinks = wf_modal(wf_img('skins/add_icon.png') . ' ' . __('Create'), __('Create'), web_SwitchModelAddForm(), 'ubButton', '420', '250');
$navlinks .= wf_Link('?module=switches', wf_img('skins/ymaps/switchdir.png') . ' ' . __('Available switches'), true, 'ubButton');
show_window('', $navlinks);
show_window(__('Available switch models'), web_SwitchModelsShow());
} else {
//show editing form
$editid = vf($_GET['edit'], 3);
//if someone post changes
if (wf_CheckPost(array('editmodelname'))) {
simple_update_field('switchmodels', 'modelname', $_POST['editmodelname'], "WHERE `id`='" . $editid . "' ");
if (wf_CheckPost(array('editports'))) {
simple_update_field('switchmodels', 'ports', $_POST['editports'], "WHERE `id`='" . $editid . "' ");
}
simple_update_field('switchmodels', 'snmptemplate', $_POST['editsnmptemplate'], "WHERE `id`='" . $editid . "' ");
log_register("SWITCHMODEL CHANGE " . $editid);
rcms_redirect("?module=switchmodels");
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php
示例16: web_EasyCreditForm
function web_EasyCreditForm($login, $cash, $credit, $userTariff, $easycreditoption)
{
/////////////////internal controller
if (wf_CheckPost(array('easycreditlogin', 'easycreditlimit', 'easycreditexpire'))) {
global $billing;
$setCredit = vf($_POST['easycreditlimit']);
$setLogin = mysql_real_escape_string($_POST['easycreditlogin']);
$setExpire = mysql_real_escape_string($_POST['easycreditexpire']);
//set credit
$billing->setcredit($setLogin, $setCredit);
log_register('CHANGE Credit (' . $setLogin . ') ON ' . $setCredit);
//set credit expire date
$billing->setcreditexpire($setLogin, $setExpire);
log_register('CHANGE CreditExpire (' . $setLogin . ') ON ' . $setExpire);
rcms_redirect('?module=userprofile&username=' . $setLogin);
}
////////////////////////////////////
$alltariffprices = zb_TariffGetPricesAll();
@($tariffPrice = isset($alltariffprices[$userTariff]) ? $alltariffprices[$userTariff] : 0);
if ($cash >= '-' . $credit) {
$creditProposal = $tariffPrice;
$creditNote = __('The amount of money in the account at the moment is sufficient to provide the service. It is therefore proposed to set a credit limit on the fee of the tariff.');
} else {
$creditProposal = abs($cash);
$creditNote = __('At the moment the account have debt. It is proposed to establish credit in its size.');
}
//calculate credit expire date
$nowTimestamp = time();
$creditSeconds = $easycreditoption * 86400;
//days*secs
$creditOffset = $nowTimestamp + $creditSeconds;
$creditExpireDate = date("Y-m-d", $creditOffset);
//construct form
$controlIcon = wf_tag('img', false, '', 'src="skins/icon_calendar.gif" height="10"');
$inputs = '';
$inputs .= wf_HiddenInput('easycreditlogin', $login);
$inputs .= wf_TextInput('easycreditlimit', '', $creditProposal, false, '5') . __('credit limit') . ' ';
$inputs .= __('until');
$inputs .= wf_DatePickerPreset('easycreditexpire', $creditExpireDate);
$inputs .= wf_Submit(__('Save'));
$form = wf_Form("", 'POST', $inputs, 'glamour');
$form .= $creditNote;
$result = wf_modal($controlIcon, __('Change') . ' ' . __('credit limit'), $form, '', '500', '180');
return $result;
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:45,代码来源:api.workaround.php
示例17: docsis_ModemProfileShow
function docsis_ModemProfileShow($modemid)
{
$modemid = vf($modemid, 3);
$data = docsis_ModemGetData($modemid);
$netdata = array();
$netdata_q = "SELECT * from `nethosts` where `ip`='" . $data['ip'] . "'";
$netdata = simple_queryall($netdata_q);
$netdata = print_r($netdata, true);
$netdata = nl2br($netdata);
$alluserips = zb_UserGetAllIPs();
$alluserips = array_flip($alluserips);
$result = wf_Link("?module=docsis", __('Back'), false, 'ubButton');
$ajaxcontainer = wf_AjaxLoader() . wf_AjaxLink("?module=docsis&ajaxsnmp=" . $modemid, __('Renew modem data'), 'ajaxdata', true, 'ubButton') . wf_tag('div', false, '', 'id="ajaxdata"') . wf_tag('div', true);
$result .= wf_modal(__('Modem diagnostics'), __('Modem diagnostics'), $ajaxcontainer, 'ubButton', '500', '400');
$result .= wf_modal(__('Networking data'), __('Networking data'), $netdata, 'ubButton', '500', '400');
$result .= wf_delimiter();
if (!empty($data)) {
$cells = wf_TableCell(__('ID'));
$cells .= wf_TableCell($data['id'] . ' ' . wf_JSAlert("?module=docsis&deletemodem=" . $modemid, web_delete_icon(), __('Removing this may lead to irreparable results')));
$rows = wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('IP'));
$cells .= wf_TableCell($data['ip']);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('MAC Lan'));
$cells .= wf_TableCell($data['maclan']);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Date'));
$cells .= wf_TableCell($data['date']);
$rows .= wf_TableRow($cells, 'row3');
if (isset($alluserips[$data['userbind']])) {
$bindedLogin = $alluserips[$data['userbind']];
$profileLink = ' ' . wf_Link('?module=userprofile&username=' . $bindedLogin, web_profile_icon() . ' ' . $bindedLogin, false, '');
} else {
$profileLink = '';
}
$cells = wf_TableCell(__('Linked user'));
$cells .= wf_TableCell($data['userbind'] . $profileLink);
$rows .= wf_TableRow($cells, 'row3');
$cells = wf_TableCell(__('Notes'));
$cells .= wf_TableCell($data['note']);
$rows .= wf_TableRow($cells, 'row3');
$result .= wf_TableBody($rows, '100%', '0', '');
$inputs = wf_TextInput('edituserbind', __('Linked user'), $data['userbind'], true, '40');
$inputs .= wf_TextInput('editnote', __('Notes'), $data['note'], true, '40');
$inputs .= wf_Submit(__('Save'));
$form = wf_Form("", 'POST', $inputs, 'glamour');
$result .= $form;
show_window(__('Modem profile'), $result);
} else {
show_window(__('Error'), __('Strange exeption'));
}
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:52,代码来源:index.php
示例18: panel
/**
* returns module control panel
*
* @return string
*/
protected function panel()
{
$result = wf_Link('?module=report_finance', __('Back'), false, 'ubButton');
$result .= wf_modal(web_icon_settings() . ' ' . __('Settings'), __('Settings'), $this->configForm(), 'ubButton', '700', '200');
$result .= wf_delimiter();
$monthArr = months_array_localized();
$inputs = wf_YearSelectorPreset('yearsel', __('Year'), false, $this->year);
$inputs .= wf_Selector('monthsel', $monthArr, __('Month'), $this->month, false);
$inputs .= wf_Submit(__('Show'));
$result .= wf_Form('', 'POST', $inputs, 'glamour');
$result .= wf_CleanDiv();
return $result;
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:18,代码来源:index.php
示例19: web_TsmsMassendConfirm
function web_TsmsMassendConfirm($userarray)
{
global $td_users, $td_mobiles, $td_realnames, $td_realnamestrans, $td_tariffprices, $td_alladdress;
global $ubillingConfig;
$altCfg = $ubillingConfig->getAlter();
$template = tsms_GetTemplate();
$excludeUsers = tsms_GetExcludeUsers();
$excludeArr = array();
//ignoring DEAD_TAGID users
if ($altCfg['CEMETERY_ENABLED']) {
$cemetery = new Cemetery();
$excludeCemetery = $cemetery->getAllTagged();
if (!empty($excludeCemetery)) {
foreach ($excludeCemetery as $eecl => $eecld) {
$excludeUsers[$eecl] = 'NOP';
}
}
|
请发表评论