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


PHP MiscLib::baseURL方法代码示例

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


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

示例1: preprocess

 function preprocess()
 {
     // check for posts before drawing anything, so we can redirect
     if (isset($_REQUEST['reginput'])) {
         $input = strtoupper(trim($_REQUEST['reginput']));
         // CL always exits
         if ($input == "CL") {
             CoreLocal::set("msgrepeat", 0);
             CoreLocal::set("toggletax", 0);
             CoreLocal::set("togglefoodstamp", 0);
             $this->change_page(MiscLib::baseURL() . "gui-modules/pos2.php");
             return false;
         } elseif ($input == "") {
             $this->change_page('BitCoinPaymentPage.php?amount=' . CoreLocal::get('amtdue'));
             return false;
         } elseif ($input != "" && substr($input, -2) != "CL") {
             // any other input is an alternate amount
             // convert cents to dollars and make sure it's valid
             $this->amt = $input;
             if (is_numeric($input)) {
                 $this->amt = MiscLib::truncate2($this->amt / 100.0);
             }
             if ($this->validateAmount($this->amt)) {
                 $this->change_page('BitCoinPaymentPage.php?amount=' . $this->amt);
                 return false;
             }
         }
     }
     // post?
     return true;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:31,代码来源:BitCoinAmountPage.php

示例2: head_content

    function head_content()
    {
        $base = MiscLib::baseURL();
        ?>
        <script type="text/javascript" src="<?php 
        echo $base;
        ?>
js/selectSubmit.js"></script>
        <script type="text/javascript">
        function qmNumberPress()
        {
            var qm_submitted = false;
            $('#ddQKselect').keyup(function(event) {
                if (event.which >= 49 && event.which <= 57) {
                    if (!qm_submitted) {
                        qm_submitted = true;
                        $('#qmform').submit();
                    }
                } else if (event.which >= 97 && event.which <= 105) {
                    if (!qm_submitted) {
                        qm_submitted = true;
                        $('#qmform').submit();
                    }
                }
            });
        }
        </script>
        <?php 
    }
开发者ID:phpsmith,项目名称:IS4C,代码行数:29,代码来源:QMDisplay.php

示例3: parse

 public function parse($str)
 {
     $ret = $this->default_json();
     if (CoreLocal::get('memberID') == '0') {
         $ret['output'] = DisplayLib::boxMsg(_("Apply member number first"), _('No member selected'), false, array_merge(array('Member Search [ID]' => 'parseWrapper(\'ID\');'), DisplayLib::standardClearButton()));
         return $ret;
     }
     if ($str == 'ACCESS') {
         if (CoreLocal::get('AccessQuickMenu') != '' && class_exists('QuickMenuLauncher')) {
             $qm = new QuickMenuLauncher();
             return $qm->parse('QM' . CoreLocal::get('AccessQuickMenu'));
         } else {
             $str = 'ACCESS0';
         }
     }
     if ($str !== 'ACCESS6' && CoreLocal::get('AccessSelection') === '') {
         CoreLocal::set('AccessSelection', $str);
         $ret['main_frame'] = MiscLib::baseURL() . 'gui-modules/adminlogin.php?class=AccessProgramParser';
         return $ret;
     } else {
         CoreLocal::set('AccessSelection', '');
     }
     $selection = substr($str, 6);
     TransRecord::addRecord(array('upc' => 'ACCESS', 'description' => 'ACCESS SIGNUP', 'quantity' => 1, 'ItemQtty' => 1, 'numflag' => $selection));
     $ret['output'] = DisplayLib::lastpage();
     $ret['receipt'] = 'accessSignupSlip';
     return $ret;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:28,代码来源:AccessProgramParser.php

示例4: preprocess

 public function preprocess()
 {
     $this->upc = FormLib::get('upc');
     if (FormLib::get('reginput', false) !== false) {
         $inp = FormLib::get('reginput');
         if (strtoupper($inp) == 'CL') {
             $this->change_page(MiscLib::baseURL() . 'gui-modules/pos2.php');
             return false;
         }
         $dbc = Database::pDataConnect();
         $empP = $dbc->prepare('
             SELECT emp_no
             FROM employees
             WHERE EmpActive=1
                 AND frontendsecurity >= ?
                 AND (CashierPassword=? OR AdminPassword=?)');
         if ($dbc->getValue($empP, array(30, $inp, $inp)) !== false) {
             CoreLocal::set('strRemembered', $this->upc);
             CoreLocal::set('msgrepeat', 1);
             $arr = CoreLocal::get('WicOverride');
             if (!is_array($arr)) {
                 $arr = array();
             }
             $arr[] = ltrim($this->upc, '0');
             CoreLocal::set('WicOverride', $arr);
             $this->change_page(MiscLib::baseURL() . 'gui-modules/pos2.php');
             return false;
         } else {
             $this->box_color = 'errorColoredArea';
         }
     }
     return true;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:33,代码来源:WicOverridePage.php

示例5: apply

 public function apply()
 {
     if (CoreLocal::get('memberID') && in_array(CoreLocal::get('memberID'), CoreLocal::get('InactiveMemList')) && CoreLocal::get('InactiveMemApproval')) {
         return MiscLib::baseURL() . 'gui-modules/adminlogin.php?class=InactiveMemTotalAction';
     } else {
         return true;
     }
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:8,代码来源:InactiveMemTotalAction.php

示例6: body_content

    function body_content()
    {
        $stem = MiscLib::baseURL() . 'graphics/';
        ?>
        <div class="baseHeight">
        <div class="centeredDisplay colored rounded">
        <span class="larger">gift card transaction</span>
        <form name="selectform" method="post" id="selectform"
            action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
">
        <?php 
        if (CoreLocal::get('touchscreen')) {
            ?>
        <button type="button" class="pos-button coloredArea"
            onclick="scrollDown('#selectlist');">
            <img src="<?php 
            echo $stem;
            ?>
down.png" width="16" height="16" />
        </button>
        <?php 
        }
        ?>
        <select id="selectlist" name="selectlist" 
            onblur="$('#selectlist').focus()">
        <option value="">Sale
        <option value="AC">Activate
        <option value="AV">Add Value
        <option value="PV">Balance
        </select>
        <?php 
        if (CoreLocal::get('touchscreen')) {
            ?>
        <button type="button" class="pos-button coloredArea"
            onclick="scrollUp('#selectlist');">
            <img src="<?php 
            echo $stem;
            ?>
up.png" width="16" height="16" />
        </button>
        <?php 
        }
        ?>
        <p>
            <button class="pos-button" type="submit">Select [enter]</button>
            <button class="pos-button" type="submit" onclick="$('#selectlist').val('');">
                Cancel [clear]
            </button>
        </p>
        </div>
        </form>
        </div>
        <?php 
    }
开发者ID:phpsmith,项目名称:IS4C,代码行数:56,代码来源:giftcardlist.php

示例7: adminLoginCallback

 public static function adminLoginCallback($success)
 {
     if ($success) {
         CoreLocal::set('strRemembered', '');
         CoreLocal::set("isMember", 1);
         CoreLocal::set("memType", 1);
         CoreLocal::set("boxMsg", "Member Status Toggled!");
         CoreLocal::set('boxMsgButtons', array('Dismiss [clear]' => '$(\'#reginput\').val(\'\');submitWrapper();'));
         return MiscLib::baseURL() . 'gui-modules/boxMsg2.php';
     } else {
         return false;
     }
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:13,代码来源:MemStatusAdminLogin.php

示例8: successfully

 /**
   Apply action
   @return [boolean] true if the action
     completes successfully (or is not
     necessary at all) or [string] url
     to redirect to another page for
     further decisions/input.
 */
 public function apply()
 {
     $temp = PrehLib::chargeOk();
     if (CoreLocal::get("balance") < CoreLocal::get("memChargeTotal") && CoreLocal::get("memChargeTotal") > 0) {
         if (CoreLocal::get('msgrepeat') == 0) {
             CoreLocal::set("boxMsg", sprintf("<b>A/R Imbalance</b><br />\n                    Total AR payments \$%.2f exceeds AR balance %.2f<br />", CoreLocal::get("memChargeTotal"), CoreLocal::get("balance")));
             CoreLocal::set('boxMsgButtons', array('Confirm [enter]' => '$(\'#reginput\').val(\'\');submitWrapper();', 'Cancel [clear]' => '$(\'#reginput\').val(\'CL\');submitWrapper();'));
             CoreLocal::set("strEntered", "TL");
             return MiscLib::baseURL() . "gui-modules/boxMsg2.php?quiet=1";
         }
     }
     return true;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:21,代码来源:ArOverpayAction.php

示例9: testMiscLib

 public function testMiscLib()
 {
     chdir(dirname(__FILE__) . '/../../pos/is4c-nf/gui-modules/');
     $rel = MiscLib::baseURL();
     $this->assertEquals('../', $rel);
     $this->assertEquals(1, MiscLib::nullwrap(1));
     $this->assertEquals(1.5, MiscLib::nullwrap(1.5));
     $this->assertEquals('test', MiscLib::nullwrap('test'));
     $this->assertEquals(0, MiscLib::nullwrap(False));
     $this->assertEquals(1, MiscLib::truncate2(1));
     $this->assertEquals(1.99, MiscLib::truncate2(1.99));
     $this->assertEquals(1.99, MiscLib::truncate2("1.99"));
     $this->assertEquals(1.35, MiscLib::truncate2("1.345"));
     $hostCheck = MiscLib::pingport(CoreLocal::get('localhost'), CoreLocal::get('DBMS'));
     $this->assertInternalType('integer', $hostCheck);
     $hostCheck = MiscLib::win32();
     $this->assertInternalType('integer', $hostCheck);
     $scale = MiscLib::scaleObject();
     if ($scale !== 0) {
         $this->assertInstanceOf('ScaleDriverWrapper', $scale);
     }
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:22,代码来源:BaseLibsTest.php

示例10: ageCheck

 /**
   Enforce age-based restrictions
   @param $required_age [int] age in years
   @param $ret [array] Parser-formatted return value
   @return [array]
    0 - boolean age-related approval required
    1 - array Parser-formatted return value
 */
 public static function ageCheck($required_age, $ret)
 {
     $my_url = MiscLib::baseURL();
     if (CoreLocal::get("cashierAge") < 18 && CoreLocal::get("cashierAgeOverride") != 1) {
         $ret['main_frame'] = $my_url . "gui-modules/adminlogin.php?class=AgeApproveAdminLogin";
         return array(true, $ret);
     }
     if (CoreLocal::get("memAge") == "") {
         CoreLocal::set("memAge", date('Ymd'));
     }
     $stamp = strtotime(CoreLocal::get("memAge"));
     $of_age_on_day = mktime(0, 0, 0, date('n', $stamp), date('j', $stamp), date('Y', $stamp) + $required_age);
     $today = strtotime(date('Y-m-d'));
     if ($of_age_on_day > $today) {
         $ret['udpmsg'] = 'twoPairs';
         $ret['main_frame'] = $my_url . 'gui-modules/requestInfo.php?class=UPC';
         return array(true, $ret);
     }
     return array(false, $ret);
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:28,代码来源:PrehLib.php

示例11: head_content

    function head_content()
    {
        if (!$this->run_transaction) {
            return '';
        }
        $e2e = new MercuryE2E();
        ?>
<script type="text/javascript">
function emvSubmit()
{
    $('div.baseHeight').html('Processing transaction');
    // POST XML request to driver using AJAX
    var xmlData = '<?php 
        echo json_encode($e2e->prepareDataCapVoid($this->id));
        ?>
';
    if (xmlData == '"Error"') { // failed to save request info in database
        location = '<?php 
        echo MiscLib::baseURL();
        ?>
gui-modules/boxMsg2.php';
        return false;
    }
    $.ajax({
        url: 'http://localhost:8999',
        type: 'POST',
        data: xmlData,
        dataType: 'text',
        success: function(resp) {
            // POST result to PHP page in POS to
            // process the result.
            console.log('success');
            console.log(resp);
            var f = $('<form id="js-form"></form>');
            f.append($('<input type="hidden" name="xml-resp" />').val(resp));
            $('body').append(f);
            $('#js-form').submit();
        },
        error: function(resp) {
            // display error to user?
            // go to dedicated error page?
            console.log('error');
            console.log(resp);
            var f = $('<form id="js-form"></form>');
            f.append($('<input type="hidden" name="xml-resp" />').val(resp));
            $('body').append(f);
            $('#js-form').submit();
        }
    });
}
</script>
        <?php 
    }
开发者ID:phpsmith,项目名称:IS4C,代码行数:53,代码来源:PaycardEmvVoid.php

示例12: preprocess

 function preprocess()
 {
     // initialize the payment on bitcoinpay.com
     // when page first loads
     if (isset($_REQUEST['amount'])) {
         $payment = $this->initPayment($_REQUEST['amount']);
         if ($payment === false) {
             CoreLocal::set('boxMsg', 'Error initializing Bitcoin payment');
             $this->change_page(MiscLib::baseURL() . 'gui-modules/boxMsg2.php');
             return false;
         }
         $this->payment_id = $payment['payment_id'];
         $this->payment_url = $payment['payment_url'];
         return true;
     }
     // Check for clear button to cancel request
     if (isset($_REQUEST['reginput'])) {
         $input = strtoupper(trim($_REQUEST['reginput']));
         // CL always exits
         if ($input == "CL") {
             $this->change_page(MiscLib::baseURL() . "gui-modules/pos2.php");
             return false;
         }
     }
     // Check for payment complete notification
     // add tender and return to main screen
     if (isset($_REQUEST['finish'])) {
         TransRecord::addtender('BITCOIN', CoreLocal::get('BitCoinTender'), -1 * $_REQUEST['finish']);
         CoreLocal::set('strRemembered', 'TO');
         CoreLocal::set('msgrepeat', 1);
         $this->change_page(MiscLib::baseURL() . "gui-modules/pos2.php");
         return false;
     }
     return true;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:35,代码来源:BitCoinPaymentPage.php

示例13: body_content

    function body_content()
    {
        $default = '';
        if (CoreLocal::get('fntlDefault') === '' || CoreLocal::get('fntlDefault') == 1) {
            $default = 'EC';
        } else {
            if (CoreLocal::get('fntlDefault') == 0) {
                $default = 'EF';
            }
        }
        ?>
        <div class="baseHeight">
        <div class="centeredDisplay colored rounded">
        <?php 
        if (empty($this->tendertype)) {
            ?>
        <span class="larger">Customer is using the</span>
        <?php 
        }
        ?>
        <form id="selectform" method="post" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
">

        <?php 
        if (empty($this->tendertype)) {
            ?>
            <?php 
            $stem = MiscLib::baseURL() . 'graphics/';
            ?>
            <?php 
            if (CoreLocal::get('touchscreen')) {
                ?>
            <button type="button" class="pos-button coloredArea"
                onclick="scrollDown('#selectlist');">
                <img src="<?php 
                echo $stem;
                ?>
down.png" width="16" height="16" />
            </button>
            <?php 
            }
            ?>
            <select size="2" name="selectlist" 
                id="selectlist" onblur="$('#selectlist').focus();">
            <option value='EC' <?php 
            echo $default == 'EC' ? 'selected' : '';
            ?>
>Cash Portion
            <option value='EF' <?php 
            echo $default == 'EF' ? 'selected' : '';
            ?>
>Food Portion
            </select>
            <?php 
            if (CoreLocal::get('touchscreen')) {
                ?>
            <button type="button" class="pos-button coloredArea"
                onclick="scrollUp('#selectlist');">
                <img src="<?php 
                echo $stem;
                ?>
up.png" width="16" height="16" />
            </button>
            <?php 
            }
            ?>
        <?php 
        } else {
            ?>
            <input type="text" id="tenderamt" 
                name="tenderamt" onblur="$('#tenderamt').focus();" />
            <br />
            <span class="larger">Press [enter] to tender 
            $<?php 
            printf("%.2f", $this->tendertype == 'EF' ? CoreLocal::get("fsEligible") : CoreLocal::get("runningTotal"));
            ?>
            as <?php 
            echo $this->tendertype == "EF" ? "EBT Food" : "EBT Cash";
            ?>
            or input a different amount</span>
            <br />
            <input type="hidden" name="tendertype" value="<?php 
            echo $this->tendertype;
            ?>
" />
        <?php 
        }
        ?>
        <p>
            <button class="pos-button" type="submit">Select [enter]</button>
            <button class="pos-button" type="submit" 
                onclick="$('#selectlist').append($('<option>').val(''));$('#selectlist').val('');">
                Cancel [clear]
            </button>
        </p>
        </div>
        </form>
        </div>
//.........这里部分代码省略.........
开发者ID:phpsmith,项目名称:IS4C,代码行数:101,代码来源:fsTotalConfirm.php

示例14: body_content

    function body_content()
    {
        $stem = MiscLib::baseURL() . 'graphics/';
        ?>
        <div class="baseHeight">
        <div class="centeredDisplay colored rounded">
            <span class="larger"><?php 
        echo _("administrative tasks");
        ?>
</span>
            <br />
        <form id="selectform" method="post" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
">
        <?php 
        if (CoreLocal::get('touchscreen')) {
            ?>
        <button type="button" class="pos-button coloredArea"
            onclick="scrollDown('#selectlist');">
            <img src="<?php 
            echo $stem;
            ?>
down.png" width="16" height="16" />
        </button>
        <?php 
        }
        ?>
        <select name="selectlist" id="selectlist" onblur="$('#selectlist').focus();">
        <option value=''><?php 
        echo _("Select a Task");
        ?>
        <option value='SUSPEND'>1. <?php 
        echo _("Suspend Transaction");
        ?>
        <option value='RESUME'>2. <?php 
        echo _("Resume Transaction");
        ?>
        <?php 
        if (CoreLocal::get('SecurityTR') != 30 || $this->security >= 30) {
            ?>
            <option value='TR'>3. <?php 
            echo _("Tender Report");
            ?>
        <?php 
        }
        ?>
        <?php 
        if ($this->security >= 30) {
            ?>
            <option value='OTR'>4. <?php 
            echo _("Any Tender Report");
            ?>
            <option value='UNDO'><?php 
            echo _('Undo Transaction');
            ?>
        <?php 
        }
        ?>
        </select>
        <?php 
        if (CoreLocal::get('touchscreen')) {
            ?>
        <button type="button" class="pos-button coloredArea"
            onclick="scrollUp('#selectlist');">
            <img src="<?php 
            echo $stem;
            ?>
up.png" width="16" height="16" />
        </button>
        <?php 
        }
        ?>
        <?php 
        echo FormLib::tokenField();
        ?>
        <div class="smaller">
            <?php 
        echo _("use arrow keys to navigate");
        ?>
        </div>
        <p>
            <button class="pos-button" type="submit">Select [enter]</button>
            <button class="pos-button" type="submit" onclick="$('#selectlist').val('');">
                Cancel [clear]
            </button>
        </p>
        </div>
        </form>
        </div>
        <?php 
        $this->add_onload_command("\$('#selectlist').focus();");
        $this->add_onload_command("selectSubmit('#selectlist', '#selectform')\n");
    }
开发者ID:phpsmith,项目名称:IS4C,代码行数:94,代码来源:adminlist.php

示例15: dispatch

 /**
   Use a dedicated dispatch function to launch
   page classes.
   @param $redirect [boolean, default true]
     go to login page if an error occurs
   
   This method checks for the session variable
   CashierNo as a general indicator that the current
   session has been properly initialized
 */
 public static function dispatch($redirect = true)
 {
     $bt = debug_backtrace();
     if (count($bt) == 1) {
         $page = basename($_SERVER['PHP_SELF']);
         $class = substr($page, 0, strlen($page) - 4);
         if (CoreLocal::get('CashierNo') !== '' && $class != 'index' && class_exists($class)) {
             $page = new $class();
         } elseif ($redirect) {
             $url = MiscLib::baseURL();
             header('Location: ' . $url . 'login.php');
         } else {
             trigger_error('Missing class ' . $class, E_USER_NOTICE);
         }
     }
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:26,代码来源:AutoLoader.php


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