当前位置: 首页>>代码示例>>PHP>>正文


PHP MiscLib::errorBeep方法代码示例

本文整理汇总了PHP中MiscLib::errorBeep方法的典型用法代码示例。如果您正苦于以下问题:PHP MiscLib::errorBeep方法的具体用法?PHP MiscLib::errorBeep怎么用?PHP MiscLib::errorBeep使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MiscLib的用法示例。


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

示例1: body_content

    function body_content()
    {
        $this->input_header("onsubmit=\"return submitWrapper();\"");
        ?>
        <div class="baseHeight">

        <?php 
        $buttons = is_array(CoreLocal::get('boxMsgButtons')) ? CoreLocal::get('boxMsgButtons') : array();
        echo DisplayLib::boxMsg(CoreLocal::get("boxMsg"), "", true, $buttons);
        echo "</div>";
        echo "<div id=\"footer\">";
        echo DisplayLib::printfooter();
        echo "</div>";
        echo '<input type="hidden" id="endorseType" value="' . (isset($_REQUEST['endorse']) ? $_REQUEST['endorse'] : '') . '" />';
        echo '<input type="hidden" id="endorseAmt" value="' . (isset($_REQUEST['endorseAmt']) ? $_REQUEST['endorseAmt'] : '') . '" />';
        /**
          Encode the last command entered in the page. With payment
          terminals facing the customer, input processing may happen
          in the background and alter the value of strEntered
        */
        echo '<input type="hidden" id="repeat-cmd" value="' . CoreLocal::get('strEntered') . '" />';
        CoreLocal::set("boxMsg", '');
        CoreLocal::set("boxMsgButtons", array());
        CoreLocal::set("msgrepeat", 2);
        if (!isset($_REQUEST['quiet'])) {
            MiscLib::errorBeep();
        }
    }
开发者ID:phpsmith,项目名称:IS4C,代码行数:28,代码来源:boxMsg2.php

示例2: body_content

    function body_content()
    {
        $this->add_onload_command("\$('#reginput').focus();\n");
        $info = _("price check");
        $inst = array(_("[scan] item"), _("[clear] to cancel"));
        if (!empty($this->upc)) {
            if (!$this->found) {
                $info = _("not a valid item");
                $inst = array(_("[scan] another item"), _("[clear] to cancel"));
                $this->upc = "";
                MiscLib::errorBeep();
            } else {
                $info = $this->pricing['description'] . '<br />' . $this->pricing['department'] . '<br />' . _("Current Price") . ": " . $this->pricing['actual_price'] . '<br />' . _("Regular Price") . ": " . $this->pricing['regular_price'];
                if (!empty($this->pricing['memPrice'])) {
                    $info .= "<br />(" . _("Member Price") . ": " . $this->pricing['memPrice'] . ")";
                }
                $inst = array(_("[scan] another item"), _("[enter] to ring this item"), _("[clear] to cancel"));
            }
        }
        ?>
        <div class="baseHeight">
        <div class="coloredArea centeredDisplay">
        <span class="larger">
        <?php 
        echo $info;
        ?>
        </span><br />
        <form name="form" id="formlocal" method="post" 
            autocomplete="off" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
">
        <input type="text" name="reginput" tabindex="0" 
            onblur="$('#reginput').focus();" id="reginput" />
        <input type="hidden" name="upc" value="<?php 
        echo $this->upc;
        ?>
" />
        </form>
        <p>
        <span id="localmsg"><?php 
        foreach ($inst as $i) {
            echo $i . "<br />";
        }
        ?>
</span>
        </p>
        </div>
        </div>
        <?php 
    }
开发者ID:phpsmith,项目名称:IS4C,代码行数:51,代码来源:PriceCheckPage.php

示例3: printheaderb

 /**
   Get a centered message box
   @param $strmsg the message
   @param $icon graphic icon file
   @param $noBeep don't send a scale beep
   @param $buttons keyed array of touchable/clickable buttons
     - key is the text shown on the button
     - value is javascript executed onclick
   @return An HTML string
 
   This function will include the header
   printheaderb(). 
 */
 public static function msgbox($strmsg, $icon, $noBeep = false, $buttons = array())
 {
     $ret = self::printheaderb();
     $ret .= "<div id=\"boxMsg\" class=\"centeredDisplay\">";
     $ret .= "<div class=\"boxMsgAlert coloredArea\">";
     $ret .= CoreLocal::get("alertBar");
     if (CoreLocal::get('alertBar') == '') {
         $ret .= 'Alert';
     }
     $ret .= "</div>";
     $ret .= "\n        <div class=\"boxMsgBody\">\n            <div class=\"msgicon\"><img src=\"{$icon}\" /></div>\n            <div class=\"msgtext\">" . $strmsg . "\n            </div>\n            <div class=\"clear\"></div>\n        </div>";
     if (!empty($buttons) && is_array($buttons)) {
         $ret .= '<div class="boxMsgBody boxMsgButtons">';
         foreach ($buttons as $label => $action) {
             $label = preg_replace('/(\\[.+?\\])/', '<span class="smaller">\\1</span>', $label);
             $color = preg_match('/\\[clear\\]/i', $label) ? 'errorColoredArea' : 'coloredArea';
             $ret .= sprintf('<button type="button" class="pos-button %s" 
                     onclick="%s">%s</button>', $color, $action, $label);
         }
         $ret .= '</div>';
     }
     $ret .= "</div>";
     // close #boxMsg
     // input has probably already been marked up for display.
     // no need to re-wrap in various <div>s
     if (strstr($strmsg, 'id="boxMsg"') && strstr($strmsg, 'class="boxMsgBody"')) {
         $ret = $strmsg;
     }
     if (!$noBeep) {
         MiscLib::errorBeep();
     }
     CoreLocal::set("strRemembered", CoreLocal::get("strEntered"));
     CoreLocal::set("msgrepeat", 1);
     return $ret;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:48,代码来源:DisplayLib.php


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