• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP whoami函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中whoami函数的典型用法代码示例。如果您正苦于以下问题:PHP whoami函数的具体用法?PHP whoami怎么用?PHP whoami使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了whoami函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: zb_CardCreate

/**
 * Creates card in database with some serial and price
 * 
 * @param int   $serial
 * @param float $cash
 * 
 * @return void
 */
function zb_CardCreate($serial, $cash)
{
    $admin = whoami();
    $date = curdatetime();
    $query = "INSERT INTO `cardbank` (`id` ,`serial` , `cash` , `admin` , `date` , `active` , `used` , `usedate` , `usedlogin` , `usedip`) " . "VALUES (NULL , '" . $serial . "', '" . $cash . "', '" . $admin . "', '" . $date . "', '1', '0', NULL , '', NULL);";
    nr_query($query);
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:15,代码来源:api.cardpay.php


示例2: ms_MassSendMessage

 function ms_MassSendMessage($users_arr, $message)
 {
     global $alter_conf;
     if (!empty($users_arr)) {
         foreach ($users_arr as $eachuser) {
             if (!$alter_conf['MASSSEND_SAFE']) {
                 ms_SendMessage($eachuser, $message);
             } else {
                 ms_TicketCreate('NULL', $eachuser, $message, 'NULL', whoami());
                 $newid = simple_get_lastid('ticketing');
                 ms_TicketSetDone($newid);
             }
         }
         log_register("MASSEND (" . sizeof($users_arr) . ")");
     }
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:16,代码来源:index.php


示例3: zb_CashAdd

/**
 * Add some cash to user login in stargazer, and creates payment record in registry
 * 
 * @global object $billing   Pre-initialized low-level stargazer handlers
 * @param string  $login     Existing users login
 * @param float   $cash      Amount of money to put/set on user login
 * @param string  $operation Operation  type: add, correct,set,mock
 * @param int     $cashtype  Existing cashtype ID for payment registry
 * @param string  $note      Payment notes
 * 
 * @return void
 */
function zb_CashAdd($login, $cash, $operation, $cashtype, $note)
{
    global $billing;
    $login = mysql_real_escape_string($login);
    $cash = mysql_real_escape_string($cash);
    $cash = preg_replace("#[^0-9\\-\\.]#Uis", '', $cash);
    $cash = trim($cash);
    $cashtype = vf($cashtype);
    $note = mysql_real_escape_string($note);
    $date = curdatetime();
    $balance = zb_CashGetUserBalance($login);
    $admin = whoami();
    $noteprefix = '';
    /**
     * They wanna fuck you for free and explode ya
     * I gonna waiting no time let me show ya
     * You gonna be kidding Couse nothing is happening
     * You wanna be happy So follow me
     */
    switch ($operation) {
        case 'add':
            $targettable = 'payments';
            $billing->addcash($login, $cash);
            log_register('BALANCEADD (' . $login . ') ON ' . $cash);
            break;
        case 'correct':
            $targettable = 'paymentscorr';
            $billing->addcash($login, $cash);
            log_register('BALANCECORRECT (' . $login . ') ON ' . $cash);
            break;
        case 'set':
            $targettable = 'payments';
            $billing->setcash($login, $cash);
            log_register("BALANCESET (" . $login . ') ON ' . $cash);
            $noteprefix = 'BALANCESET:';
            break;
        case 'mock':
            $targettable = 'payments';
            log_register("BALANCEMOCK (" . $login . ') ON ' . $cash);
            $noteprefix = 'MOCK:';
            break;
    }
    //push dat payment to payments registry
    $query = "INSERT INTO `" . $targettable . "` (\n                    `id` ,\n                    `login` ,\n                    `date` ,\n                    `admin` ,\n                    `balance` ,\n                    `summ` ,\n                    `cashtypeid` ,\n                    `note`\n                    )\n                    VALUES (\n                    NULL , '" . $login . "', '" . $date . "', '" . $admin . "', '" . $balance . "', '" . $cash . "', '" . $cashtype . "', '" . ($noteprefix . $note) . "'\n                    );";
    nr_query($query);
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:58,代码来源:api.payments.php


示例4: pleac_Determining_Current_Function_Name

function pleac_Determining_Current_Function_Name()
{
    // AFAICT there is no means of obtaining the name of the currently executing
    // function, or, for that matter, perform any stack / activation record,
    // inspection. It *is* possible to:
    //
    // * Obtain a list of the currently-defined functions ['get_defined_functions']
    // * Check whether a specific function exists ['function_exists']
    // * Use the 'Reflection API'
    //
    // So, to solve this problem would seem to require adopting a convention where
    // a string representing the function name is passed as an argument, or a local
    // variable [perhaps called, '$name'] is so set [contrived, and of limited use]
    function whoami()
    {
        $name = 'whoami';
        echo "I am: {$name}\n";
    }
    // ------------
    whoami();
}
开发者ID:Halfnhav4,项目名称:pfff,代码行数:21,代码来源:Determining_Current_Function_Name.php


示例5: web_PaymentsByUser

/**
 * Returns list of previous user payments
 * 
 * @param string $login
 * @return string
 */
function web_PaymentsByUser($login)
{
    global $ubillingConfig;
    $allpayments = zb_CashGetUserPayments($login);
    $alter_conf = $ubillingConfig->getAlter();
    $alltypes = zb_CashGetAllCashTypes();
    $allservicenames = zb_VservicesGetAllNamesLabeled();
    $total_payments = "0";
    $curdate = curdate();
    $deletingAdmins = array();
    $editingAdmins = array();
    $iCanDeletePayments = false;
    $iCanEditPayments = false;
    $currentAdminLogin = whoami();
    //extract admin logins with payments delete rights
    if (!empty($alter_conf['CAN_DELETE_PAYMENTS'])) {
        $deletingAdmins = explode(',', $alter_conf['CAN_DELETE_PAYMENTS']);
        $deletingAdmins = array_flip($deletingAdmins);
    }
    //extract admin logins with date edit rights
    if (!empty($alter_conf['CAN_EDIT_PAYMENTS'])) {
        $editingAdmins = explode(',', $alter_conf['CAN_EDIT_PAYMENTS']);
        $editingAdmins = array_flip($editingAdmins);
    }
    //setting editing/deleting flags
    $iCanDeletePayments = isset($deletingAdmins[$currentAdminLogin]) ? true : false;
    $iCanEditPayments = isset($editingAdmins[$currentAdminLogin]) ? true : false;
    $cells = wf_TableCell(__('ID'));
    $cells .= wf_TableCell(__('IDENC'));
    $cells .= wf_TableCell(__('Date'));
    $cells .= wf_TableCell(__('Payment'));
    $cells .= wf_TableCell(__('Balance before'));
    $cells .= wf_TableCell(__('Cash type'));
    $cells .= wf_TableCell(__('Payment note'));
    $cells .= wf_TableCell(__('Admin'));
    $cells .= wf_TableCell(__('Actions'));
    $rows = wf_TableRow($cells, 'row1');
    if (!empty($allpayments)) {
        foreach ($allpayments as $eachpayment) {
            if ($alter_conf['TRANSLATE_PAYMENTS_NOTES']) {
                $eachpayment['note'] = zb_TranslatePaymentNote($eachpayment['note'], $allservicenames);
            }
            //hightlight of today payments
            if ($alter_conf['HIGHLIGHT_TODAY_PAYMENTS']) {
                if (ispos($eachpayment['date'], $curdate)) {
                    $hlight = 'paytoday';
                } else {
                    $hlight = 'row3';
                }
            } else {
                $hlight = 'row3';
            }
            if (!empty($alter_conf['DOCX_SUPPORT']) && !empty($alter_conf['DOCX_CHECK'])) {
                $printcheck = wf_Link('?module=printcheck&paymentid=' . $eachpayment['id'], wf_img('skins/printer_small.gif', __('Print')), false);
            } else {
                $printcheck = wf_tag('a', false, '', 'href="#" onClick="window.open(\'?module=printcheck&paymentid=' . $eachpayment['id'] . '\',\'checkwindow\',\'width=800,height=600\')"');
                $printcheck .= wf_img('skins/printer_small.gif', __('Print'));
                $printcheck .= wf_tag('a', true);
            }
            //payments deleting controls
            if ($iCanDeletePayments) {
                $deleteControls = wf_JSAlert('?module=addcash&username=' . $login . '&paymentdelete=' . $eachpayment['id'], wf_img('skins/delete_small.png', __('Delete')), __('Removing this may lead to irreparable results')) . '   ';
            } else {
                $deleteControls = '';
            }
            //payments editing form
            if ($iCanEditPayments) {
                $editControls = wf_modalAuto(wf_img_sized('skins/icon_edit.gif', __('Edit'), '10'), __('Edit'), web_PaymentEditForm($eachpayment), '') . '   ';
            } else {
                $editControls = '';
            }
            $cells = wf_TableCell($eachpayment['id']);
            $cells .= wf_TableCell(zb_NumEncode($eachpayment['id']));
            $cells .= wf_TableCell($eachpayment['date']);
            $cells .= wf_TableCell($eachpayment['summ']);
            $cells .= wf_TableCell($eachpayment['balance']);
            $cells .= wf_TableCell(@__($alltypes[$eachpayment['cashtypeid']]));
            $cells .= wf_TableCell($eachpayment['note']);
            $cells .= wf_TableCell($eachpayment['admin']);
            $cells .= wf_TableCell($deleteControls . $editControls . $printcheck);
            $rows .= wf_TableRow($cells, $hlight);
            $total_payments = $total_payments + $eachpayment['summ'];
        }
    }
    $result = wf_TableBody($rows, '100%', '0', 'sortable');
    $result .= __('Total payments') . ': ' . wf_tag('b') . abs($total_payments) . wf_tag('b') . wf_tag('br');
    return $result;
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:94,代码来源:api.workaround.php


示例6: change_activity

function change_activity($Ticket_Number, $activity)
{
    $last_activity = Ticket::get_ticket_activity_id($Ticket_Number);
    if ($last_activity != $activity) {
        $last_activity = Ticket::get_activity_name($last_activity);
        $new_activity = Ticket::get_activity_name($activity);
        $result = Ticket::change_activity_id($Ticket_Number, $activity);
        $sender = whoami();
        $comment = "activity changed from \\'{$last_activity}\\' to \\'{$new_activity}\\'";
        add_task($Ticket_Number, $comment);
        notify_change($Ticket_Number, $comment);
    }
}
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:13,代码来源:change_ticket.php


示例7: date_to_unixtime

    $end_date_i = $_POST['end_date_i'];
    $end_date = date_to_unixtime("{$end_date_d_m_y} {$end_date_h}:{$end_date_i}:00");
}
# NEEDS TO BE FIXED
$t_subject = '';
if (Security::is_action_allowed("imperson") and isset($_POST['t_from'])) {
    $t_from = Security::sqlsecure($_POST['t_from']);
    if ($t_from != whoami()) {
        $t_subject = "(submitted by " . whatsmyname(whoami()) . ") : ";
    }
} else {
    $t_from = $GO_SECURITY->user_id;
}
$my_ticket->issuer = $t_from;
if (!isset($_POST['t_assigned'])) {
    $t_assigned = whoami();
}
if (!isset($_POST['t_priority'])) {
    $t_priority = 1;
}
if (!isset($_POST['project_id'])) {
    $project_id = 1;
}
if (isset($_POST['t_status'])) {
    $my_ticket->status_id = Security::sqlsecure($_POST['t_status']);
}
if (Security::is_action_allowed("set_assigned") and isset($_POST['t_assigned'])) {
    $my_ticket->assigned_id = Security::sqlsecure($_POST['t_assigned']);
} else {
    $my_ticket->assigned_id = $t_from;
}
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:entry_proc.php


示例8: OS

    <form method="POST" action="">
    <h2><center>~ Executer ~</h2></center><center><div class="box">
    <strong><h4><u>OS</u> :</strong> <i><td style="width:60px; height:20px;"><?php 
echo OS();
?>
</td></i></h4>
    <strong><h4><u>IP</u> :</strong> <i><td style="width:60px; height:20px;"><?php 
echo $_SERVER['SERVER_ADDR'];
?>
</td></i></h4>
   	<strong><h4><u>PHP Version</u> :</strong> <i><td style="width:60px; height:20px;"><?php 
echo phpversion();
?>
</td></i></h4>
   	<strong><h4><u>User :</u> :</strong> <i><td style="width:60px; height:20px;"><?php 
echo whoami();
?>
</td></i></h4>
    <strong><h4><u>Dir</u> :</strong> <i><td style="width:60px; height:20px;"><?php 
echo getcwd();
?>
</td></i></h4>
    <strong><h4><u>SafeMode</u> :</strong><i><td style="width:60px; height:20px;"> <?php 
echo SM();
?>
</td></i><br><br></h4>
    <input type="submit" style="width:60px; height:20px;" name="info" value="phpinfo"/>
    <input type="submit" style="width:60px; height:20px;" name="about" value="About"/>
   	<strong><h4><u>Cmd</u> :</strong>  <input type="text" name="cmd" value="id" /><br><input type="submit" name="submit" style="width:60px; height:20px;" value="Pwn!"/></h4><br></center></div>
   </form>
</body>
开发者ID:az0ne,项目名称:helpful,代码行数:31,代码来源:cmd.php


示例9: registerTemplateDB

 /**
  * register uploaded template into database
  * 
  * @param $path string            path to template file
  * @param $displayname string     template display name
  * @param $public      int        is template accesible from userstats
  * 
  * @return void
  */
 protected function registerTemplateDB($path, $displayname, $public)
 {
     $path = mysql_real_escape_string($path);
     $displayname = mysql_real_escape_string($displayname);
     $public = vf($public, 3);
     $admin = whoami();
     $date = curdatetime();
     $query = "INSERT INTO `docxtemplates` (`id`, `date`, `admin`, `public`, `name`, `path`) \n                VALUES (NULL, '" . $date . "', '" . $admin . "', '" . $public . "', '" . $displayname . "', '" . $path . "');";
     nr_query($query);
     log_register("PLDOCS ADD TEMPLATE `" . $displayname . "`");
 }
开发者ID:carriercomm,项目名称:Ubilling,代码行数:20,代码来源:api.documents.php


示例10: setMyLogin

 /**
  * Sets current administrator login into private prop
  * 
  * @return void
  */
 protected function setMyLogin()
 {
     $this->mylogin = whoami();
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:9,代码来源:api.adcomments.php


示例11: session_start

<?php

require_once "database.php";
session_start();
function whoami()
{
    //name is similar to unix command
    if (!isset($_SESSION['user'])) {
        return NULL;
    } else {
        return $_SESSION['user'];
    }
}
function ToDate($time)
{
    return date('d/m/Y H:i;s', $time);
}
$USERNAME = whoami();
//$USERNAME = "admin"; //hard login, temporary user, to be removed
ConnectDb();
function GetId($username)
{
    $query = "SELECT id FROM USERS WHERE username = '{$username}'";
    $result = query($query);
    $row = mysqli_fetch_array($result);
    return $row[0];
}
$USERID = GetId($USERNAME);
开发者ID:asimuzzaman,项目名称:CourseMate,代码行数:28,代码来源:head.php


示例12: rcms_parse_ini_file

<?php

$altcfg = rcms_parse_ini_file(CONFIG_PATH . 'alter.ini');
if ($altcfg['PER_CITY_ACTION']) {
    if (cfr('CITYACTION')) {
        $admin = whoami();
        $form = wf_Link(PerCityAction::MODULE_NAME, __('Clear'), true, 'ubButton');
        $form .= wf_tag('br');
        $form .= wf_Link(PerCityAction::MODULE_NAME . "&action=debtors", __('Debtors'), false, 'ubButton');
        $form .= wf_Link(PerCityAction::MODULE_NAME . "&action=city_payments", __('Payments per city'), false, 'ubButton');
        $form .= wf_Link(PerCityAction::MODULE_NAME . "&action=usersearch", __('User search'), false, 'ubButton');
        $form .= wf_Link(PerCityAction::MODULE_NAME . "&action=permission", __('Permission'), false, 'ubButton');
        $form .= wf_Link(PerCityAction::MODULE_NAME . "&action=analytics", __('Analytics'), true, 'ubButton');
        show_window(__('Actions'), $form);
        $perCityAction = new PerCityAction();
        if (isset($_GET['action'])) {
            $action = $_GET['action'];
            if ($action == 'debtors') {
                if (cfr('REPORTCITYDEBTORS')) {
                    show_window(__('Payments'), $perCityAction->CitySelector($admin, $action));
                    if (isset($_GET['citysearch'])) {
                        $cityId = $_GET['citysearch'];
                        if ($perCityAction->CheckRigts($cityId, $admin)) {
                            $perCityAction->LoadAllData('', $cityId, 'debtors');
                            if (isset($_GET['ajax'])) {
                                die($perCityAction->ajaxData());
                            }
                            $report_name = __('Debtors by city') . wf_Link(PerCityAction::MODULE_NAME . "&action=debtors&citysel={$cityId}&printable=true", wf_img("skins/printer_small.gif"));
                            show_window(__($report_name), $perCityAction->PerCityDataShow());
                        } else {
                            show_error(__('You cant control this module'));
开发者ID:carriercomm,项目名称:Ubilling,代码行数:31,代码来源:index.php


示例13: zb_UserRegisterLog

/**
 * Puts userreg log entry into database
 * 
 * @param string $login
 * 
 * @return void
 */
function zb_UserRegisterLog($login)
{
    $date = curdatetime();
    $admin = whoami();
    $login = vf($login);
    $address = zb_AddressGetFulladdresslist();
    $address = $address[$login];
    $address = mysql_real_escape_string($address);
    $query = "INSERT INTO `userreg` (`id` ,`date` ,`admin` ,`login` ,`address`) " . "VALUES (NULL , '" . $date . "', '" . $admin . "', '" . $login . "', '" . $address . "');";
    nr_query($query);
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:18,代码来源:api.userreg.php


示例14: CText

            }
        }
    }
    if (isset($login_error_message)) {
        $data = new CText($login_error_message);
    }
} else {
    /**
     * Negotiate login page language
     */
    Translator::loadSupportedLanguagesInSession();
    $supported_languages = Translator::getSupportedLanguages();
    $login_page_language_code = Translator::negotiateLoginPageLanguage($lang_get);
    $_SESSION['sess_user_language'] = $login_page_language_code;
    $form_action = HTTP_ROOT_DIR;
    $form_action .= '/' . whoami() . '.php';
    $data = UserModuleHtmlLib::loginForm($form_action, $supported_languages, $login_page_language_code, $login_error_message);
    $registration_action = HTTP_ROOT_DIR . '/browsing/registration.php';
    $cod = FALSE;
    $registration_data = new UserRegistrationForm($cod, $registration_action);
    //    $form = new UserRegistrationForm();
    //    $data = $form->render();
}
$help = translateFN('Per poter proseguire, è necessario che tu sia un utente registrato.');
$title = translateFN('Richiesta di autenticazione');
$registrationDataHtml = '';
if (is_object($registration_data)) {
    $registrationDataHtml = $registration_data->getHtml();
}
$layout_dataAr['JS_filename'] = array(JQUERY, JQUERY_MASKEDINPUT, JQUERY_NO_CONFLICT);
$layout_dataAr['CSS_filename'] = array(ROOT_DIR . '/layout/' . $_SESSION['sess_userObj']->template_family . '/css/main/index.css');
开发者ID:eguicciardi,项目名称:ada,代码行数:31,代码来源:login_required.php


示例15: zb_PrintCheck

/**
 * Renders printable HTML sales slip
 * 
 * @param int $paymentid
 * @return string
 */
function zb_PrintCheck($paymentid)
{
    $paymentdata = zb_PaymentGetData($paymentid);
    $login = $paymentdata['login'];
    $templatebody = zb_PrintCheckLoadTemplate();
    $allfioz = zb_UserGetAllRealnames();
    $alladdress = zb_AddressGetFullCityaddresslist();
    $useraddress = $alladdress[$login];
    $agent_data = zb_AgentAssignedGetDataFast($login, $useraddress);
    $cassnames = zb_PrintCheckLoadCassNames();
    $cday = date("d");
    $cmonth = date("m");
    $month_array = months_array();
    $cmonth_name = $month_array[$cmonth];
    $cyear = curyear();
    $morph = new UBMorph();
    //forming template data
    @($templatedata['{PAYID}'] = $paymentdata['id']);
    @($templatedata['{PAYIDENC}'] = zb_NumEncode($paymentdata['id']));
    @($templatedata['{PAYDATE}'] = $paymentdata['date']);
    @($templatedata['{PAYSUMM}'] = $paymentdata['summ']);
    @($templatedata['{PAYSUMM_LIT}'] = $morph->sum2str($paymentdata['summ']));
    // omg omg omg
    @($templatedata['{REALNAME}'] = $allfioz[$login]);
    @($templatedata['{BUHNAME}'] = 'а відки я знаю?');
    @($templatedata['{CASNAME}'] = $cassnames[whoami()]);
    @($templatedata['{PAYTARGET}'] = 'Оплата за послуги / ' . $paymentdata['date']);
    @($templatedata['{FULLADDRESS}'] = $useraddress);
    @($templatedata['{CDAY}'] = $cday);
    @($templatedata['{CMONTH}'] = rcms_date_localise($cmonth_name));
    @($templatedata['{CYEAR}'] = $cyear);
    @($templatedata['{DAYPAYID}'] = zb_PrintCheckGetDayNum($paymentdata['id'], $paymentdata['date']));
    //contragent full data
    @($templatedata['{AGENTEDRPO}'] = $agent_data['edrpo']);
    @($templatedata['{AGENTNAME}'] = $agent_data['contrname']);
    @($templatedata['{AGENTID}'] = $agent_data['id']);
    @($templatedata['{AGENTBANKACC}'] = $agent_data['bankacc']);
    @($templatedata['{AGENTBANKNAME}'] = $agent_data['bankname']);
    @($templatedata['{AGENTBANKCODE}'] = $agent_data['bankcode']);
    @($templatedata['{AGENTIPN}'] = $agent_data['ipn']);
    @($templatedata['{AGENTLICENSE}'] = $agent_data['licensenum']);
    @($templatedata['{AGENTJURADDR}'] = $agent_data['juraddr']);
    @($templatedata['{AGENTPHISADDR}'] = $agent_data['phisaddr']);
    @($templatedata['{AGENTPHONE}'] = $agent_data['phone']);
    //parsing result
    $result = zb_ExportParseTemplate($templatebody, $templatedata);
    return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:54,代码来源:api.cess.php


示例16: render

 /**
  * renders idle timeout auto logout scripts id needed
  * 
  * @return string
  */
 public function render()
 {
     global $ubillingConfig;
     $altCfg = $ubillingConfig->getAlter();
     $excludeAdmins = array();
     $result = '';
     if (isset($altCfg['AUTO_LOGOUT_IDLE'])) {
         if ($altCfg['AUTO_LOGOUT_IDLE']) {
             $myLogin = whoami();
             $idleTimeout = $altCfg['AUTO_LOGOUT_IDLE'];
             if (file_exists(USERS_PATH . $myLogin)) {
                 if (isset($altCfg['AUTO_LOGOUT_EXCLUDE'])) {
                     //extract exclude admins
                     if (!empty($altCfg['AUTO_LOGOUT_EXCLUDE'])) {
                         $excludeAdmins = explode(',', $altCfg['AUTO_LOGOUT_EXCLUDE']);
                         $excludeAdmins = array_flip($excludeAdmins);
                     }
                     //push timer script
                     if (!isset($excludeAdmins[$myLogin])) {
                         $result = $this->createDialog();
                         $result .= $this->createTimer($altCfg['AUTO_LOGOUT_IDLE']);
                     }
                 }
             }
         }
     }
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:33,代码来源:api.idlelogout.php


示例17: DarkVoid

?>
                          <div class="notificationArea">
                 <?php 
if (LOGGED_IN) {
    $notifyArea = new DarkVoid();
    print $notifyArea->render();
}
?>
            </div> 
		</div> <?php 
if (LOGGED_IN) {
    ?>
           <form action="" method="POST">
	  <input name="logout_form" value="1" type="hidden">
	  <input value="<?php 
    echo __('Log out') . ' ' . whoami();
    ?>
" type="submit">
      	  </form>
     
	</div> 
	<div id="menu">
		<ul>
				<?php 
    rcms_show_element('navigation', '<li><a href="{link}" target="{target}" id="{id}">{title}</a></li>');
    ?>
		</ul>
	</div>
	<center>
<table style="text-align: left; width: 90%;" border="0" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF">
  <tbody>
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:skin.general.php


示例18: catv_FeeChargeAllUsers

function catv_FeeChargeAllUsers($month, $year)
{
    $month = mysql_real_escape_string($month);
    $year = vf($year);
    $catv_conf = catv_LoadConfig();
    $alltariffprices = catv_TariffGetAllPrices();
    $alluseractivity = catv_ActivityGetLastAll();
    $allusers = catv_UsersGetAll();
    $date = curdatetime();
    $admin = whoami();
    if (!empty($allusers)) {
        $usercount = 0;
        // begin user processing
        foreach ($allusers as $io => $eachuser) {
            $usercount = $usercount + 1;
            $monthlyfee = $alltariffprices[$eachuser['tariff']];
            $balance = $eachuser['cash'];
            $discount = $eachuser['discount'];
            if ($catv_conf['FEE_DISCOUNT']) {
                $finalfee = $monthlyfee - $discount;
            } else {
                $finalfee = $monthlyfee;
            }
            $newbalance = $balance - $finalfee;
            //if protect disconnected users
            if ($catv_conf['FEE_ONLY_ACTIVE']) {
                //check is user enabled?
                if ($alluseractivity[$eachuser['id']] != 0) {
                    //do the fee
                    $querycash = "UPDATE `catv_users` SET `cash` = '" . $newbalance . "' WHERE `id` = '" . $eachuser['id'] . "'; " . "\n";
                    nr_query($querycash);
                    //log the fee
                    $queryfee = "INSERT INTO `catv_fees` (`id` ,`date` ,`userid` ,`summ` ,`balance` ,`month` ,`year` ,`admin`) VALUES (NULL , '" . $date . "', '" . $eachuser['id'] . "', '" . $finalfee . "', '" . $balance . "', '" . $month . "', '" . $year . "', '" . $admin . "'); " . "\n";
                    nr_query($queryfee);
                }
            } else {
                //if protection disabled - just do it
                $querycash = "UPDATE `catv_users` SET `cash` = '" . $newbalance . "' WHERE `id` = '" . $eachuser['id'] . "'; " . "\n";
                nr_query($querycash);
                $queryfee = "INSERT INTO `catv_fees` (`id` ,`date` ,`userid` ,`summ` ,`balance` ,`month` ,`year` ,`admin`) VALUES (NULL , '" . $date . "', '" . $eachuser['id'] . "', '" . $finalfee . "', '" . $balance . "', '" . $month . "', '" . $year . "', '" . $admin . "'); " . "\n";
                nr_query($queryfee);
            }
        }
        log_register("CATV MONTHFEECHARGE " . $usercount);
    }
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:46,代码来源:api.catv.php


示例19: __

                    <td>' . __('Text') . '</td>
                    </tr>
                    ';
        if (!empty($allmessages)) {
            foreach ($allmessages as $io => $eachmessage) {
                $result .= '
                    <tr class="row3">
                    <td>' . $eachmessage['date'] . '</td>
                    <td>' . $eachmessage['text'] . '</td>
                    </tr>
                    ';
            }
        }
        $result .= '</table>';
        show_window(__('Previous messages'), $result);
    }
    if (isset($_GET['username'])) {
        $login = $_GET['username'];
        web_MessagesShowPrevious($login);
        if (isset($_POST['messagetext'])) {
            zb_TicketCreate('NULL', $login, $_POST['messagetext'], 'NULL', whoami());
            $newid = simple_get_lastid('ticketing');
            zb_TicketSetDone($newid);
            rcms_redirect("?module=pl_sendmessage&username=" . $login);
        }
        web_MessageSendForm();
        show_window('', web_UserControls($login));
    }
} else {
    show_error(__('You cant control this module'));
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php


示例20: setLogin

 /**
  * Sets current logged in user login into private property
  * 
  * @return void
  */
 protected function setLogin()
 {
     if (LOGGED_IN) {
         $this->myLogin = whoami();
     }
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:11,代码来源:api.globalmenu.php



注:本文中的whoami函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP widget函数代码示例发布时间:2022-05-23
下一篇:
PHP whichApplication函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap