本文整理汇总了PHP中MiscLib::base_url方法的典型用法代码示例。如果您正苦于以下问题:PHP MiscLib::base_url方法的具体用法?PHP MiscLib::base_url怎么用?PHP MiscLib::base_url使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MiscLib
的用法示例。
在下文中一共展示了MiscLib::base_url方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handle
public function handle($upc, $json)
{
$my_url = MiscLib::base_url();
switch (ltrim($upc, '0')) {
case '8006':
if (CoreLocal::get("memberID") == 0) {
$json['main_frame'] = $my_url . 'gui-modules/memlist.php';
} else {
if (CoreLocal::get("msgrepeat") == 0) {
CoreLocal::set("boxMsg", "<B>" . $total . " stock payment</B><BR>insert form<BR>press [enter] to endorse<P><FONT size='-1'>[clear] to cancel</FONT>");
$ret["main_frame"] = $my_url . "gui-modules/boxMsg2.php?endorse=stock&endorseAmt=" . $total;
}
}
break;
case '8005':
if (CoreLocal::get("memberID") == 0) {
$json['main_frame'] = $my_url . 'gui-modules/memlist.php';
} elseif (CoreLocal::get("isMember") == 0) {
$json['output'] = DisplayLib::boxMsg(_("member discount not applicable"), '', false, DisplayLib::standardClearButton());
} elseif (CoreLocal::get("percentDiscount") > 0) {
$json['output'] = DisplayLib::boxMsg(CoreLocal::get("percentDiscount") . "% discount already applied", '', false, DisplayLib::standardClearButton());
}
break;
}
// magic plu, but other conditions not matched
if ($json['main_frame'] === false && empty($json['output'])) {
$json['output'] = DisplayLib::boxMsg($upc . "<br />is not a valid item", '', false, DisplayLib::standardClearButton());
}
return $json;
}
示例2: preprocess
function preprocess()
{
if (isset($_REQUEST['doLookup'])) {
$ref = $_REQUEST['id'];
$local = $_REQUEST['local'];
$mode = $_REQUEST['mode'];
$obj = null;
$resp = array();
foreach (CoreLocal::get('RegisteredPaycardClasses') as $rpc) {
$obj = new $rpc();
if ($obj->myRefNum($ref)) {
break;
} else {
$obj = null;
}
}
if ($obj === null) {
$resp['output'] = DisplayLib::boxMsg('Invalid Transaction ID' . '<br />Local System Error', '', true);
$resp['confirm_dest'] = MiscLib::base_url() . 'gui-modules/pos2.php';
$resp['cancel_dest'] = MiscLib::base_url() . 'gui-modules/pos2.php';
} else {
if ($local == 0 && $mode == 'verify') {
$resp['output'] = DisplayLib::boxMsg('Cannot Verify - Already Complete' . '<br />Local System Error', '', true);
$resp['confirm_dest'] = MiscLib::base_url() . 'gui-modules/pos2.php';
$resp['cancel_dest'] = MiscLib::base_url() . 'gui-modules/pos2.php';
} else {
$resp = $obj->lookupTransaction($ref, $local, $mode);
}
}
echo JsonLib::array_to_json($resp);
return false;
}
return true;
}
示例3: ajax
protected function ajax()
{
$decision = strtoupper(FormLib::get('input', 'CL'));
$ret = array('dest_page' => MiscLib::base_url() . 'gui-modules/pos2.php', 'endorse' => false, 'cleared' => false);
$repeat_cmd = CoreLocal::get('strEntered');
$requested_cmd = FormLib::get('cmd');
if (!empty($requested_cmd)) {
$repeat_cmd = $requested_cmd;
}
if ($decision == "CL") {
CoreLocal::set("msgrepeat", 0);
CoreLocal::set("lastRepeat", '');
CoreLocal::set("toggletax", 0);
CoreLocal::set("togglefoodstamp", 0);
CoreLocal::set("RepeatAgain", false);
$ret['cleared'] = true;
} elseif (strlen($decision) > 0) {
CoreLocal::set("msgrepeat", 1);
CoreLocal::set("strRemembered", $repeat_cmd);
} else {
CoreLocal::set("msgrepeat", 1);
CoreLocal::set("strRemembered", $repeat_cmd);
}
return $ret;
}
示例4: parse
function parse($str)
{
$ret = $this->default_json();
if ($str == "FNTL") {
$ret['main_frame'] = MiscLib::base_url() . 'gui-modules/fsTotalConfirm.php';
} elseif ($str == "TETL") {
$ret['main_frame'] = MiscLib::base_url() . 'gui-modules/requestInfo.php?class=Totals';
} elseif ($str == "FTTL") {
PrehLib::finalttl();
} elseif ($str == "TL") {
CoreLocal::set('End', 0);
$chk = PrehLib::ttl();
if ($chk !== True) {
$ret['main_frame'] = $chk;
}
} elseif ($str == "MTL") {
$chk = PrehLib::omtr_ttl();
if ($chk !== True) {
$ret['main_frame'] = $chk;
}
} elseif ($str == "WICTL") {
$ttl = PrehLib::wicableTotal();
$ret['output'] = DisplayLib::boxMsg(_('WIC Total') . sprintf(': $%.2f', $ttl), '', true, DisplayLib::standardClearButton());
// return early since output has been set
return $ret;
}
if (!$ret['main_frame']) {
$ret['output'] = DisplayLib::lastpage();
$ret['redraw_footer'] = True;
}
return $ret;
}
示例5: adminLoginCallback
public static function adminLoginCallback($success)
{
if ($success) {
return MiscLib::base_url() . 'ajax-callbacks/ddd.php';
} else {
return false;
}
}
示例6: handle
public function handle($deptID, $amount, $json)
{
if (CoreLocal::get('msgrepeat') == 0) {
CoreLocal::set("boxMsg", "<b>A/R Payment Sale</b><br>remember to retain you<br>\n reprinted receipt");
CoreLocal::set('boxMsgButtons', array('Confirm [enter]' => '$(\'#reginput\').val(\'\');submitWrapper();', 'Cancel [clear]' => '$(\'#reginput\').val(\'CL\');submitWrapper();'));
$json['main_frame'] = MiscLib::base_url() . 'gui-modules/boxMsg2.php?quiet=1';
}
return $json;
}
示例7: handle
public function handle($deptID, $amount, $json)
{
if (CoreLocal::get('msgrepeat') == 0) {
// invert has not happened yet
CoreLocal::set('strEntered', 100 * $amount * -1 . 'DP' . $deptID);
CoreLocal::set('msgrepeat', 1);
$json['main_frame'] = MiscLib::base_url() . 'gui-modules/boxMsg2.php?autoconfirm=1';
}
return $json;
}
示例8: adminLoginCallback
public static function adminLoginCallback($success)
{
if ($success) {
CoreLocal::set('refundComment', CoreLocal::get('strEntered'));
return MiscLib::base_url() . 'gui-modules/refundComment.php';
} else {
CoreLocal::set('refundComment', '');
return false;
}
}
示例9: preReqCheck
/**
Set up state and redirect if needed
@return True or a URL to redirect
*/
public function preReqCheck()
{
$my_url = MiscLib::base_url();
if (CoreLocal::get("approvetender") != 1) {
CoreLocal::set("approvetender", 1);
return $my_url . "gui-modules/adminlogin.php?class=ManagerApproveTender";
} else {
CoreLocal::set("approvetender", 0);
return true;
}
}
示例10: parse
public function parse($str)
{
$my_url = MiscLib::base_url();
$split = explode("DP", $str);
$dept = $split[1];
$amt = $split[0];
if (strstr($amt, '.')) {
$amt = round($amt * 100);
}
$ret = $this->default_json();
/**
This "if" is the new addition to trigger the
department select screen
*/
if (empty($split[1])) {
// no department specified, just amount followed by DP
// maintain refund if needed
if (CoreLocal::get("refund")) {
$amt = "RF" . $amt;
}
// save entered amount
CoreLocal::set("departmentAmount", $amt);
// go to the department select screen
$ret['main_frame'] = $my_url . 'gui-modules/deptlist.php';
} else {
if (CoreLocal::get("refund") == 1 && CoreLocal::get("refundComment") == "") {
if (CoreLocal::get("SecurityRefund") > 20) {
$ret['main_frame'] = $my_url . "gui-modules/adminlogin.php?class=RefundAdminLogin";
} else {
$ret['main_frame'] = $my_url . 'gui-modules/refundComment.php';
}
CoreLocal::set("refundComment", CoreLocal::get("strEntered"));
}
}
/* apply any appropriate special dept modules */
$deptmods = CoreLocal::get('SpecialDeptMap');
$db = Database::pDataConnect();
if (!is_array($deptmods) && $db->table_exists('SpecialDeptMap')) {
$model = new \COREPOS\pos\lib\models\op\SpecialDeptMapModel($db);
$deptmods = $model->buildMap();
CoreLocal::set('SpecialDeptMap', $deptmods);
}
$index = (int) ($dept / 10);
if (is_array($deptmods) && isset($deptmods[$index])) {
foreach ($deptmods[$index] as $mod) {
$obj = new $mod();
$ret = $obj->handle($dept, $amt / 100, $ret);
}
}
if (!$ret['main_frame']) {
$ret = PrehLib::deptkey($amt, $dept, $ret);
}
return $ret;
}
示例11: parse
function parse($str)
{
global $CORE_LOCAL;
$return_value = $this->default_json();
if ($CORE_LOCAL->get("LastID") != "0") {
$return_value['output'] = DisplayLib::boxMsg("transaction in progress");
} else {
$return_value['main_frame'] = MiscLib::base_url() . 'gui-modules/HelloWorld.php';
}
return $return_value;
}
示例12: __construct
/**
Constructor
The constructor automatically runs
the preprocess and print_page methods
(if applicable). Creating a new instance
will output the entire page contents
*/
public function __construct()
{
$this->page_url = MiscLib::base_url();
if (file_exists(dirname(__FILE__) . '/../graphics/is4c.gif')) {
$this->body_class = 'mainBGimage';
} elseif (file_exists(dirname(__FILE__) . '/../graphics/your_logo_here.gif')) {
$this->body_class = 'placeholderBGimage';
}
ob_start();
$this->drawPage();
ob_end_flush();
}
示例13: parse
function parse($str)
{
$ret = $this->default_json();
if (strlen($str) > 2) {
$comment = substr($str, 2);
TransRecord::addcomment($comment);
$ret['output'] = DisplayLib::lastpage();
} else {
$ret['main_frame'] = MiscLib::base_url() . 'gui-modules/bigComment.php';
}
return $ret;
}
示例14: parse
function parse($str)
{
$my_url = MiscLib::base_url();
$amt = substr($str, 0, strlen($str) - 2);
if ($amt === "") {
$amt = 100 * CoreLocal::get("amtdue");
}
$ret = $this->default_json();
CoreLocal::set("tenderTotal", $amt);
$ret['main_frame'] = $my_url . 'gui-modules/tenderlist.php';
return $ret;
}
示例15: parse
function parse($str)
{
$rt = CoreLocal::get("receiptToggle");
if ($rt == 1) {
CoreLocal::set("receiptToggle", 0);
} else {
CoreLocal::set("receiptToggle", 1);
}
$ret = $this->default_json();
// redirect to main screen so receipt icon reloads
$ret['main_frame'] = MiscLib::base_url() . 'gui-modules/pos2.php';
return $ret;
}