本文整理汇总了PHP中wf_CheckPost函数的典型用法代码示例。如果您正苦于以下问题:PHP wf_CheckPost函数的具体用法?PHP wf_CheckPost怎么用?PHP wf_CheckPost使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wf_CheckPost函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: web_CardShowDateForm
/**
* Renders year-month search interface
*
* @return void
*/
function web_CardShowDateForm()
{
$curmonth = wf_CheckPost(array('monthsel')) ? vf($_POST['monthsel'], 3) : date("m");
$curyear = wf_CheckPost(array('yearsel')) ? vf($_POST['yearsel'], 3) : date("Y");
$inputs = wf_YearSelectorPreset('yearsel', __('Year'), false, $curyear) . ' ';
$inputs .= wf_MonthSelector('monthsel', 'Month', $curmonth, false);
$inputs .= wf_Submit('Show');
$form = wf_Form("", 'POST', $inputs, 'glamour');
show_window(__('Date'), $form);
}
示例2: __construct
public function __construct()
{
//sets display year
if (wf_CheckPost(array('setyear'))) {
$this->curyear = vf($_POST['setyear'], 3);
} else {
$this->curyear = curyear();
}
//load actual month data
$this->loadData();
//load user tariffs
$this->loadTariffs();
}
示例3: setDateFilters
/**
* Sets required year/month filter properties
*
* @return void
*/
protected function setDateFilters()
{
if (wf_CheckPost(array('yearsel'))) {
$this->year = vf($_POST['yearsel']);
} else {
$this->year = date("Y");
}
if (wf_CheckPost(array('monthsel'))) {
$this->month = vf($_POST['monthsel']);
} else {
$this->month = date("m");
}
}
示例4: wf_PlPingerOptionsForm
function wf_PlPingerOptionsForm()
{
//previous setting
if (wf_CheckPost(array('packet'))) {
$currentpack = vf($_POST['packet'], 3);
} else {
$currentpack = '';
}
if (wf_CheckPost(array('count'))) {
$getCount = vf($_POST['count'], 3);
if ($getCount <= 10000) {
$currentcount = $getCount;
} else {
$currentcount = '';
}
} else {
$currentcount = '';
}
$inputs = wf_TextInput('packet', __('Packet size'), $currentpack, false, 5);
$inputs .= wf_TextInput('count', __('Count'), $currentcount, false, 5);
$inputs .= wf_Submit(__('Save'));
$result = wf_Form('', 'POST', $inputs, 'glamour');
return $result;
}
示例5: reportStreets
/**
* renders streets report
*
* @return void
*/
public function reportStreets()
{
$ukvCities = array();
$ukvStreets = array();
//loads cities and streets occupied by UKV users
$ukvCities_q = "SELECT DISTINCT `city` from `ukv_users` ORDER BY `city` ASC";
$ukvCitiesRaw = simple_queryall($ukvCities_q);
if (!empty($ukvCitiesRaw)) {
foreach ($ukvCitiesRaw as $ieuc => $euc) {
$ukvCities[$euc['city']] = $euc['city'];
}
}
$ukvStreets_q = "SELECT DISTINCT `street` from `ukv_users` ORDER BY `street` ASC";
$ukvStreetsRaw = simple_queryall($ukvStreets_q);
if (!empty($ukvStreetsRaw)) {
foreach ($ukvStreetsRaw as $ieus => $eus) {
$ukvStreets[$eus['street']] = $eus['street'];
}
}
//main codepart
$citySelected = wf_CheckPost(array('streetreportcity')) ? $_POST['streetreportcity'] : '';
$streetSelected = wf_CheckPost(array('streetreportstreet')) ? $_POST['streetreportstreet'] : '';
$inputs = wf_Selector('streetreportcity', $ukvCities, __('City'), $citySelected, false);
$inputs .= wf_Selector('streetreportstreet', $ukvStreets, __('Street'), $streetSelected, false);
$inputs .= wf_Submit(__('Show'));
$form = wf_Form('', 'POST', $inputs, 'glamour');
show_window(__('Streets report'), $form);
if (wf_CheckPost(array('streetreportcity', 'streetreportstreet')) or wf_CheckGet(array('rc', 'rs'))) {
//set form data
if (wf_CheckPost(array('streetreportcity', 'streetreportstreet'))) {
$citySearch = $_POST['streetreportcity'];
$streetSearch = $_POST['streetreportstreet'];
}
//or printable report
if (wf_CheckGet(array('rc', 'rs'))) {
$citySearch = $_GET['rc'];
$streetSearch = $_GET['rs'];
}
if (!empty($this->users)) {
$counter = 0;
$cells = wf_TableCell(__('Contract'), '10%');
$cells .= wf_TableCell(__('Full address'), '31%');
$cells .= wf_TableCell(__('Real Name'), '30%');
$cells .= wf_TableCell(__('Tariff'), '15%');
$cells .= wf_TableCell(__('Cash'), '7%');
$cells .= wf_TableCell(__('Status'), '7%');
$rows = wf_TableRow($cells, 'row1');
foreach ($this->users as $io => $eachUser) {
if ($eachUser['city'] == $citySearch and $eachUser['street'] == $streetSearch) {
$cells = wf_TableCell($eachUser['contract']);
$fullAddress = $this->userGetFullAddress($eachUser['id']);
$profileLink = wf_Link(self::URL_USERS_PROFILE . $eachUser['id'], web_profile_icon() . ' ', false, '');
$cells .= wf_TableCell($profileLink . $fullAddress);
$cells .= wf_TableCell($eachUser['realname']);
$cells .= wf_TableCell($this->tariffs[$eachUser['tariffid']]['tariffname']);
$cells .= wf_TableCell($eachUser['cash']);
$cells .= wf_TableCell(web_bool_led($eachUser['active'], true));
$rows .= wf_TableRow($cells, 'row3');
$counter++;
}
}
$result = wf_TableBody($rows, '100%', '0', 'sortable');
$result .= __('Total') . ': ' . $counter;
if (wf_CheckGet(array('printable'))) {
$this->reportPrintable($citySearch . ' / ' . $streetSearch, $result);
} else {
$printlink = wf_Link(self::URL_REPORTS_MGMT . 'reportStreets&rc=' . $citySearch . '&rs=' . $streetSearch . '&printable=true', wf_img('skins/icon_print.png', __('Print')), false, '');
show_window($citySearch . ' / ' . $streetSearch . ' ' . $printlink, $result);
}
} else {
show_window(__('Result'), __('Any users found'));
}
}
}
示例6: savePassport
/**
* saves new passport data for some build
*
* @return void
*/
protected function savePassport()
{
if (wf_CheckPost(array('savebuildpassport'))) {
$buildid = vf($_POST['savebuildpassport'], 3);
// Yep, im know - thats shitty solution. Need to refactor this later.
$clean_query = "DELETE FROM `buildpassport` WHERE `buildid`='" . $buildid . "';";
nr_query($clean_query);
$owner = mysql_real_escape_string($_POST['powner']);
$ownername = mysql_real_escape_string($_POST['pownername']);
$ownerphone = mysql_real_escape_string($_POST['pownerphone']);
$ownercontact = mysql_real_escape_string($_POST['pownercontact']);
$keys = isset($_POST['pkeys']) ? 1 : 0;
$accessnotices = mysql_real_escape_string($_POST['paccessnotices']);
$floors = mysql_real_escape_string($_POST['pfloors']);
$entrances = mysql_real_escape_string($_POST['pentrances']);
$apts = mysql_real_escape_string($_POST['papts']);
$notes = mysql_real_escape_string($_POST['pnotes']);
$query = "INSERT INTO `buildpassport` (\n `id` ,\n `buildid` ,\n `owner` ,\n `ownername` ,\n `ownerphone` ,\n `ownercontact` ,\n `keys` ,\n `accessnotices` ,\n `floors` ,\n `apts` ,\n `entrances` ,\n `notes`\n )\n VALUES (\n NULL ,\n '" . $buildid . "',\n '" . $owner . "',\n '" . $ownername . "',\n '" . $ownerphone . "',\n '" . $ownercontact . "',\n '" . $keys . "',\n '" . $accessnotices . "',\n '" . $floors . "',\n '" . $apts . "',\n '" . $entrances . "',\n '" . $notes . "'\n );\n ";
nr_query($query);
log_register('BUILD PASSPORT SAVE [' . $buildid . ']');
}
}
示例7: vf
}
}
// Удаление атрибута
if (wf_CheckGet(array('delete'))) {
$id = vf($_GET['delete'], 3);
$query = "DELETE FROM `radius_attributes` WHERE `id` = '{$id}'";
if (nr_query($query)) {
rcms_redirect("?module=freeradius&netid={$netid}");
}
}
// Редактирование атрибута
if (wf_CheckGet(array('edit'))) {
// ID редактируемого атрибута
$id = vf($_GET['edit'], 3);
// Сабмит формы редактирования атрибута
if (wf_CheckPost(array('edit'))) {
// Экранируем все введённые данные
foreach ($_POST['edit'] as &$value) {
$value = mysql_real_escape_string($value);
}
extract($_POST['edit']);
$login = isset($login) ? "'{$login}'" : 'NULL';
$query = "UPDATE `radius_attributes` SET `scenario` = '{$scenario}', `login` = {$login}, `Attribute` = '{$Attribute}', `op` = '{$op}', `Value` = '{$Value}' WHERE `id` = '{$id}'";
if (nr_query($query)) {
rcms_redirect("?module=freeradius&netid={$netid}");
}
}
$query = "SELECT * FROM `radius_attributes` WHERE `id` = '{$id}'";
$result = simple_query($query);
// Форма редактирования
$form = new InputForm('', 'POST', __('Save'), '', '', '', 'edit');
示例8: catv_GlobalControlsShow
<?php
// check for right of current admin on this module
if (cfr('CATVSTATS')) {
catv_GlobalControlsShow();
if (wf_CheckGet(array('userid'))) {
$userid = vf($_GET['userid'], 3);
$userdata = catv_UserGetData($userid);
$realname = $userdata['realname'];
$address = $userdata['street'] . ' ' . $userdata['build'] . '/' . $userdata['apt'];
//target year selection
$yearforminputs = wf_YearSelector('yearselect', 'Year', false);
$yearforminputs .= ' ';
$yearforminputs .= wf_Submit('Show');
$yearform = wf_Form('', 'POST', $yearforminputs, 'glamour', '');
show_window($address . ' ' . $realname, $yearform . '<div style="clear: both;"></div>');
if (wf_CheckPost(array('yearselect'))) {
$target_year = $_POST['yearselect'];
} else {
$target_year = curyear();
}
catv_UserStatsByYear($userid, $target_year);
catv_DecoderShowAllChanges($userid);
catv_ActivityShowAll($userid);
catv_ProfileBack($userid);
}
} else {
show_error(__('You cant control this module'));
}
示例9: getCemeteryControls
/**
* Cemetery controls
*
* @return string
*/
protected function getCemeteryControls()
{
$result = '';
if (isset($this->alterCfg['CEMETERY_ENABLED'])) {
if ($this->alterCfg['CEMETERY_ENABLED']) {
$cemetery = new Cemetery();
//integrated controller
if (wf_CheckPost(array('cemeterysetasundead'))) {
$cemetery->setUndead($_POST['cemeterysetasundead']);
rcms_redirect('?module=userprofile&username=' . $this->login);
}
if (wf_CheckPost(array('cemeterysetasdead'))) {
$cemetery->setDead($_POST['cemeterysetasdead']);
rcms_redirect('?module=userprofile&username=' . $this->login);
}
//activity view
if ($cemetery->isUserDead($this->login)) {
$log = wf_modalAuto(wf_img_sized('skins/dead_icon.png', '', '12', '12'), __('User lifestory'), $cemetery->renderCemeteryLog($this->login));
$result = ' / ' . __('Subscriber is not connected') . ' ' . $log;
} else {
$log = wf_modalAuto(wf_img_sized('skins/pigeon_icon.png', '', '12', '12'), __('User lifestory'), $cemetery->renderCemeteryLog($this->login));
$result = ' / ' . __('Subscriber is connected') . ' ' . $log;
}
}
}
return $result;
}
示例10: dateControl
/**
* show calendar contol form
*
* @return string
*/
public function dateControl()
{
if (wf_CheckPost(array('showdate'))) {
$curdate = $_POST['showdate'];
} else {
$curdate = curdate();
}
$inputs = wf_DatePickerPreset('showdate', $curdate);
$inputs .= wf_Submit(__('Show'));
$result = wf_Form('', 'POST', $inputs, 'glamour');
return $result;
}
示例11: zb_StorageDelete
zb_StorageDelete($_GET['edittemplate']);
zb_PhpConsoleCreateTemplate($_POST['edittemplatename'], $_POST['edittemplatebody']);
log_register("DEVCONSOLE TEMPLATE EDIT");
rcms_redirect("?module=sqlconsole&devconsole=true");
}
//construct query forms
$sqlinputs = wf_Link("?module=sqlconsole", 'SQL Console', false, 'ubButton');
$sqlinputs .= wf_Link("?module=sqlconsole&devconsole=true", 'PHP Console', false, 'ubButton');
if (cfr('ROOT')) {
$sqlinputs .= wf_Link("?module=migration", __('Migration'), false, 'ubButton');
$sqlinputs .= wf_Link("?module=migration2", __('Migration') . ' 2', false, 'ubButton');
if (cfr('MIKMIGR')) {
$sqlinputs .= wf_Link("?module=mikbill_migration", __('Migration') . ' mikbill', true, 'ubButton');
}
}
if (wf_CheckPost(array('sqlq'))) {
if ($alterconf['DEVCON_SQL_KEEP']) {
$startQuery = trim($_POST['sqlq']);
} else {
$startQuery = '';
}
} else {
$startQuery = '';
}
$sqlinputs .= wf_TextArea('sqlq', '', $startQuery, true, '80x10');
$sqlinputs .= wf_CheckInput('tableresult', 'Display query result as table', true, false);
$sqlinputs .= wf_Submit('Process query');
$sqlform = wf_Form('', 'POST', $sqlinputs, 'glamour');
$phpinputs = wf_Link("?module=sqlconsole", 'SQL Console', false, 'ubButton');
$phpinputs .= wf_Link("?module=sqlconsole&devconsole=true", 'PHP Console', false, 'ubButton');
if (cfr('ROOT')) {
示例12: show_window
} else {
show_window(__('Error'), __('No mobile'));
}
}
}
//group user sending
if (wf_CheckPost(array('msendtype'))) {
$filterParams = '';
if (wf_CheckPost(array('msendtariffname'))) {
$filterParams = $_POST['msendtariffname'];
}
$userFilters = tsms_UserFilter($_POST['msendtype'], $filterParams);
show_window(__('Confirmation'), web_TsmsMassendConfirm($userFilters));
}
//sending subroutine
if (wf_CheckPost(array('massendConfirm'))) {
$smsTemplate = tsms_GetTemplate();
$smsWap = tsms_GetWap();
$smsSign = tsms_GetSign();
$smsTz = tsms_GetTz();
$unpackData = base64_decode($_POST['massendConfirm']);
$unpackData = unserialize($unpackData);
if (!empty($_POST['massendConfirm'])) {
if (!empty($unpackData)) {
log_register("TSMS SEND MASS FOR `" . sizeof($unpackData) . "` USERS");
foreach ($unpackData as $eachLogin => $eachPhone) {
$newMessage = tsms_ParseTemplate($eachLogin, $smsTemplate);
tsms_SendSMS($eachPhone, $smsSign, $newMessage, $smsWap, $smsTz);
}
$notifyText = sizeof($unpackData) . ' ' . __('SMS queued and waiting to send') . wf_Link('?module=turbosms', __('Click here to view today sending queue'), true, 'ubButton');
$doneNotify = wf_modalOpened(__('Send SMS for user group'), $notifyText, '400', '200');
示例13: wf_TableCell
$cells .= wf_TableCell(__('Visual'));
$rows = wf_TableRow($cells, 'row1');
$result = $this->panel();
if (!empty($this->data)) {
foreach ($this->data as $line => $data) {
$monthArpu = $data['count'] != 0 ? $mountArpu = round($data['summ'] / $data['count'], 2) : 0;
$cells = wf_TableCell($line);
$cells .= wf_TableCell($data['count']);
$cells .= wf_TableCell($monthArpu);
$cells .= wf_TableCell($data['summ']);
$cells .= wf_TableCell(web_bar($data['summ'], $this->totalsum), '', '', 'sorttable_customkey="' . $data['summ'] . '"');
$rows .= wf_TableRow($cells, 'row3');
}
}
$result .= wf_TableBody($rows, '100%', '0', 'sortable');
return $result;
}
}
$arpuReport = new ReportArpu();
//config data controller
if (wf_CheckPost(array('newtarifflines'))) {
$arpuReport->saveConfig($_POST['newtarifflines']);
rcms_redirect("?module=report_arpu");
} else {
//or some report rendering
$arpuReport->parsePayments();
show_window(__('Tariff lines ARPU report'), $arpuReport->render());
}
} else {
show_error(__('You cant control this module'));
}
示例14: 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');
//.........这里部分代码省略.........
示例15: SendDog
<?php
if (cfr('SENDDOG')) {
$altCfg = $ubillingConfig->getAlter();
if ($altCfg['SENDDOG_ENABLED']) {
$sendDog = new SendDog();
//editing config
if (wf_CheckPost(array('editconfig'))) {
$sendDog->saveConfig();
rcms_redirect($sendDog->getBaseUrl());
}
if (!wf_CheckGet(array('showmisc'))) {
//render config interface
show_window(__('SendDog configuration'), $sendDog->renderConfigForm());
} else {
//render SMS queue
$smsQueue = $_GET['showmisc'];
switch ($smsQueue) {
case 'tsms':
show_window(__('View SMS sending queue'), $sendDog->renderTurboSMSQueue());
break;
case 'smsflybalance':
show_window(__('SMS-Fly') . ' ' . __('Balance'), $sendDog->renderSmsflyBalance());
break;
case 'telegramcontacts':
show_window(__('Telegram bot contacts'), $sendDog->renderTelegramContacts());
break;
}
}
} else {
show_error(__('This module is disabled'));