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

PHP gohome函数代码示例

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

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



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

示例1: suspendorder

function suspendorder()
{
    testremote();
    $query_a = "select emp_no, trans_no from localtemptrans";
    $db_a = tDataConnect();
    $result_a = sql_query($query_a, $db_a);
    $row_a = sql_fetch_array($result_a);
    $cashier_no = substr("000" . $row_a["emp_no"], -2);
    $trans_no = substr("0000" . $row_a["trans_no"], -4);
    if ($_SESSION["standalone"] == 0) {
        if ($_SESSION["remoteDBMS"] == "mssql") {
            $query = "insert " . trim($_SESSION["mServer"]) . "." . trim($_SESSION["mDatabase"]) . ".dbo.suspended select * from localtemptrans";
            $result = sql_query($query, $db_a);
        } else {
            $query = "insert suspended select * from localtemptrans";
            $result = sql_query($query, $db_a);
            if (uploadtable("suspended") == 1) {
                cleartemptrans();
            }
        }
    } else {
        $query = "insert suspended select * from localtemptrans";
        $result = sql_query($query, $db_a);
    }
    $_SESSION["plainmsg"] = "transaction suspended";
    $_SESSION["msg"] = 2;
    receipt("suspended");
    $recall_line = $_SESSION["standalone"] . " " . $_SESSION["laneno"] . " " . $cashier_no . " " . $trans_no;
    gohome();
    sql_close($db_a);
}
开发者ID:jdpurdyvi,项目名称:IS4C,代码行数:31,代码来源:special.php


示例2: dirname

<?php

include_once dirname(__FILE__) . "/../db_connect.php";
include_once dirname(__FILE__) . "/../functions.php";
if (session_status() == PHP_SESSION_NONE) {
    sec_session_start();
}
// are you logged in?
if (!isset($_SESSION['username'])) {
    gohome();
}
// are you in the correct group?
if ($_SESSION['role_id'] < 2) {
    errormsg('Your role does not have access to this resource');
} else {
    if (isset($_POST['client_name'])) {
        // sanitise variables for security
        $client_name = filter_input(INPUT_POST, 'client_name', FILTER_SANITIZE_STRING);
        if (check_client_name_isfree($client_name, $mysqli)) {
            if (add_client($client_name, $mysqli)) {
                echo "\n\t\t\t\t\t\t<!-- Begin Content Division -->\n\t\t\t\t\t\t<div id='content'>\t\t\t\t\t\n\t\t\t\t\t\t\t<legend>Create Client</legend>\n\t\t\t\t\t\t\t" . quickalert("success", "New client '" . $client_name . "' has been added to the database.\n\t\t\t\t\t\t\t\t\t<a class='alert-link' href='" . SITE_URL . "/?do=create&object=domain'>Add Domain</a>") . "\n\t\t\t\t\t\t<!-- End Content Division -->\n\t\t\t\t\t\t</div>\n\t\t\t\t\t";
            } else {
                errormsg("Failed to insert new record into the database");
            }
        } else {
            errormsg("There is already a client called '" . $client_name . "' in the database!");
        }
    } elseif (!$_POST) {
        echo "\n\t\t<!-- Begin Content Division -->\n\t\t<div id='content'>\n\t\t\t<form class='form-horizontal' action='" . SITE_URL . "/?do=create&object=client' method='post' name='create_client'>\n\t\t\t\t<fieldset>\n\t\t\t\t\n\t\t\t\t<legend>Create Client</legend>\n\t\t\t\t" . quickalert("info", "Client names must be alphanumeric. They can contain spaces, underscores and dashes.") . "\n\t\t\t\t<div class='form-group'>\n\t\t\t\t  <label class='col-md-4 control-label' for='textinput'>Client Name</label>  \n\t\t\t\t  <div class='col-md-4'>\n\t\t\t\t  <input required name='client_name' name='client_name' type='text' placeholder='InternetWigits' pattern='^([a-zA-Z0-9]){3,50}\$' class='form-control input-md'>\n\t\t\t\t  <span class='help-block'>Enter the Clients Name Here.</span>  \n\t\t\t\t  </div>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div class='form-group'>\n\t\t\t\t  <label class='col-md-4 control-label' for='singlebutton'></label>\n\t\t\t\t  <div class='col-md-4'>\n\t\t\t\t    <button id='singlebutton' name='singlebutton' class='btn success large' type='submit'><span class='glyphicon glyphicon-plus-sign' id='logIcon'></span> Create </button>\n\t\t\t\t  </div>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t<!-- End Content Division -->\n\t\t</div>\n\t\t";
    } else {
        errormsg('POST error. Possible missing input.');
开发者ID:neoloc,项目名称:mscadmin,代码行数:31,代码来源:client.php


示例3: tenderReport


//.........这里部分代码省略.........
            $receipt .= "  " . substr($timeStamp . $blank, 0, 10) . substr($row_ckq["register_no"] . $blank, 0, 7) . substr($row_ckq["trans_no"] . $blank, 0, 6) . substr($row_ckq["emp_no"] . $blank, 0, 6) . substr($blank . number_format($row_ckq["changeGiven"], 2), -10) . substr($blank . number_format($row_ckq["ckTender"], 2), -10) . "\n";
        }
        $receipt .= centerString("------------------------------------------------------");
        $query_ckq = "select SUM(ckTender) from cktenders where tdate > '" . $EOS . "' and register_no = " . $_SESSION["laneno"];
        $result_ckq = sql_query($query_ckq, $db_a);
        $row_ckq = sql_fetch_array($result_ckq);
        $receipt .= substr($blank . $blank . $blank . $blank . "Total: " . number_format($row_ckq[0], 2), -56) . "\n";
    } else {
        $receipt .= "\n\n" . centerString(" * * *   N O N E   * * * ") . "\n\n" . centerString("------------------------------------------------------");
    }
    $receipt .= str_repeat("\n", 3);
    // apbw/tt 3/16/05 Franking II
    $receipt .= chr(27) . chr(33) . chr(5) . centerString("D E B I T  C A R D  T E N D E R S") . "\n";
    $receipt .= centerString("------------------------------------------------------");
    $result_dcq = sql_query($query_dcq, $db_a);
    $num_rows_dcq = sql_num_rows($result_dcq);
    if ($num_rows_dcq > 0) {
        $receipt .= $fieldNames;
        for ($i = 0; $i < $num_rows_dcq; $i++) {
            $row_dcq = sql_fetch_array($result_dcq);
            $timeStamp = timeStamp($row_dcq["tdate"]);
            $receipt .= "  " . substr($timeStamp . $blank, 0, 10) . substr($row_dcq["register_no"] . $blank, 0, 7) . substr($row_dcq["trans_no"] . $blank, 0, 6) . substr($row_dcq["emp_no"] . $blank, 0, 6) . substr($blank . number_format($row_dcq["changeGiven"], 2), -10) . substr($blank . number_format($row_dcq["dcTender"], 2), -10) . "\n";
        }
        $receipt .= centerString("------------------------------------------------------");
        $query_dcq = "select SUM(dcTender) from dctenders where tdate > '" . $EOS . "' and register_no = " . $_SESSION["laneno"];
        $result_dcq = sql_query($query_dcq, $db_a);
        $row_dcq = sql_fetch_array($result_dcq);
        $receipt .= substr($blank . $blank . $blank . $blank . "Total: " . number_format($row_dcq[0], 2), -56) . "\n";
    } else {
        $receipt .= "\n\n" . centerString(" * * *   N O N E   * * * ") . "\n\n" . centerString("------------------------------------------------------");
    }
    $receipt .= str_repeat("\n", 3);
    // apbw/tt 3/16/05 Franking II
    $receipt .= chr(27) . chr(33) . chr(5) . centerString("C R E D I T   C A R D   T E N D E R S") . "\n";
    $receipt .= centerString("------------------------------------------------------");
    $result_ccq = sql_query($query_ccq, $db_a);
    $num_rows_ccq = sql_num_rows($result_ccq);
    if ($num_rows_ccq > 0) {
        $receipt .= $fieldNames;
        for ($i = 0; $i < $num_rows_ccq; $i++) {
            $row_ccq = sql_fetch_array($result_ccq);
            $timeStamp = timeStamp($row_ccq["tdate"]);
            $receipt .= "  " . substr($timeStamp . $blank, 0, 10) . substr($row_ccq["register_no"] . $blank, 0, 7) . substr($row_ccq["trans_no"] . $blank, 0, 6) . substr($row_ccq["emp_no"] . $blank, 0, 6) . substr($blank . number_format($row_ccq["changeGiven"], 2), -10) . substr($blank . number_format($row_ccq["ccTender"], 2), -10) . "\n";
        }
        $receipt .= centerString("------------------------------------------------------");
        $query_ccq = "select SUM(ccTender) from cctenders where tdate > '" . $EOS . "' and register_no = " . $_SESSION["laneno"];
        $result_ccq = sql_query($query_ccq, $db_a);
        $row_ccq = sql_fetch_array($result_ccq);
        $receipt .= substr($blank . $blank . $blank . $blank . "Total: " . number_format($row_ccq[0], 2), -56) . "\n";
    } else {
        $receipt .= "\n\n" . centerString(" * * *   N O N E   * * * ") . "\n\n" . centerString("------------------------------------------------------");
    }
    $receipt .= str_repeat("\n", 3);
    // apbw/tt 3/16/05 Franking II
    $receipt .= centerString("H O U S E / S T O R E   C H A R G E   T E N D E R S") . "\n";
    $receipt .= centerString("------------------------------------------------------");
    $result_miq = sql_query($query_miq, $db_a);
    $num_rows_miq = sql_num_rows($result_miq);
    if ($num_rows_miq > 0) {
        $chgFieldNames = "  " . substr("Time" . $blank, 0, 10) . substr("Lane" . $blank, 0, 7) . substr("Trans #" . $blank, 0, 6) . substr("Emp #" . $blank, 0, 8) . substr("Member #" . $blank, 0, 10) . substr("Amount" . $blank, 0, 10) . "\n";
        $receipt .= $chgFieldNames;
        for ($i = 0; $i < $num_rows_miq; $i++) {
            $row_miq = sql_fetch_array($result_miq);
            $timeStamp = timeStamp($row_miq["tdate"]);
            $receipt .= "  " . substr($timeStamp . $blank, 0, 10) . substr($row_miq["register_no"] . $blank, 0, 7) . substr($row_miq["trans_no"] . $blank, 0, 6) . substr($row_miq["emp_no"] . $blank, 0, 6) . substr($row_miq["card_no"] . $blank, 0, 6) . substr($blank . number_format($row_miq["MiTender"], 2), -10) . "\n";
        }
        $receipt .= centerString("------------------------------------------------------");
        $query_miq = "select SUM(miTender) from mitenders where tdate > '" . $EOS . "' and register_no = " . $_SESSION["laneno"];
        $result_miq = sql_query($query_miq, $db_a);
        $row_miq = sql_fetch_array($result_miq);
        $receipt .= substr($blank . $blank . $blank . $blank . "Total: " . number_format($row_miq[0], 2), -56) . "\n";
    } else {
        $receipt .= "\n\n" . centerString(" * * *   N O N E   * * * ") . "\n\n" . centerString("------------------------------------------------------");
    }
    $receipt .= str_repeat("\n", 3);
    // apbw/tt 3/16/05 Franking II
    $receipt .= chr(27) . chr(33) . chr(5) . centerString("T R I - M E T  P A S S E S   S O L D") . "\n";
    $receipt .= centerString("------------------------------------------------------");
    $result_bp = sql_query($query_bp, $db_a);
    $num_rows_bp = sql_num_rows($result_bp);
    if ($num_rows_bp > 0) {
        $receipt .= $fieldNames;
        for ($i = 0; $i < $num_rows_bp; $i++) {
            $row_bp = sql_fetch_array($result_bp);
            $timeStamp = timeStamp($row_bp["tdate"]);
            $receipt .= "  " . substr($timeStamp . $blank, 0, 10) . substr($row_bp["register_no"] . $blank, 0, 7) . substr($row_bp["trans_no"] . $blank, 0, 6) . substr($row_bp["emp_no"] . $blank, 0, 6) . substr($blank . $row_bp["upc"], -10) . substr($blank . number_format($row_bp["total"], 2), -10) . "\n";
        }
        $receipt .= centerString("------------------------------------------------------");
    } else {
        $receipt .= "\n\n" . centerString(" * * *   N O N E   * * * ") . "\n\n" . centerString("------------------------------------------------------");
    }
    $receipt .= str_repeat("\n", 8);
    // apbw/tt 3/16/05 Franking II
    writeLine($receipt . chr(27) . chr(105));
    // apbw/tt 3/16/05 Franking II
    sql_close($db_a);
    $_SESSION["msgrepeat"] = 1;
    $_SESSION["strRemembered"] = "ES";
    gohome();
}
开发者ID:WedgeCoop,项目名称:IS4C,代码行数:101,代码来源:tenderReport.php


示例4: tenderReport


//.........这里部分代码省略.........
    }
    $receipt .= str_repeat("\n", 3);
    // apbw/tt 3/16/05 Franking II
    //ccm-rle commented out house store charges because ccm doesn't currently use them
    /*
    	$receipt .= centerString("H O U S E / S T O R E   C H A R G E   T E N D E R S")."\n";
    	$receipt .=	centerString("------------------------------------------------------");
    
    	$result_miq = sql_query($query_miq, $db_a);
    	$num_rows_miq = sql_num_rows($result_miq);
    
    	if ($num_rows_miq > 0) {
    		
    		$chgFieldNames = "  ".substr("Time".$blank, 0, 10)
    				.substr("Lane".$blank, 0, 7)
    				.substr("Trans #".$blank, 0, 6)
    				.substr("Emp #".$blank, 0, 8)
    				.substr("Member #".$blank, 0, 10)
    				.substr("Amount".$blank, 0, 10)."\n";
    		
    		$receipt .= $chgFieldNames;
    
    		for ($i = 0; $i < $num_rows_miq; $i++) {
    			$row_miq = sql_fetch_array($result_miq);
    			$timeStamp = timeStamp($row_miq["tdate"]);
    			$receipt .= "  ".substr($timeStamp.$blank, 0, 10)
    				.substr($row_miq["register_no"].$blank, 0, 7)
    				.substr($row_miq["trans_no"].$blank, 0, 6)
    				.substr($row_miq["emp_no"].$blank, 0, 6)
    				.substr($row_miq["card_no"].$blank, 0, 6)
    				.substr($blank.number_format($row_miq["MiTender"], 2), -10)."\n";
    
    		}
    
    		$receipt.= centerString("------------------------------------------------------");
    
    //		$query_miq = "select * from mitendertotal where register_no = ".$_SESSION["laneno"];
    //		$result_miq = sql_query($query_miq, $db_a);
    //		$row_miq = sql_fetch_array($result_miq);
    
    		$query_miq = "select SUM(miTender) from mitenders where tdate > '".$EOS."' and register_no = ".$_SESSION["laneno"];
    		$result_miq = sql_query($query_miq, $db_a);
    		$row_miq = sql_fetch_array($result_miq);
    
    		$receipt .= substr($blank.$blank.$blank.$blank."Total: ".number_format($row_miq[0],2), -56)."\n";
    	}
    	else {
    		$receipt .= "\n\n".centerString(" * * *   N O N E   * * * ")."\n\n"
    			.centerString("------------------------------------------------------");
    	}
    
    	$receipt .= str_repeat("\n", 3);	// apbw/tt 3/16/05 Franking II
    */
    //--------------------------------------------------------------------
    //ccm-rle commented out TRI MET passes because CCM doesn't use them
    /*
    		$receipt .= chr(27).chr(33).chr(5).centerString("T R I - M E T  P A S S E S   S O L D")."\n";
    	$receipt .=	centerString("------------------------------------------------------");
    
    	$result_bp = sql_query($query_bp, $db_a);
    	$num_rows_bp = sql_num_rows($result_bp);
    
    	if ($num_rows_bp > 0) {
    
    		$receipt .= $fieldNames;
    
    		for ($i = 0; $i < $num_rows_bp; $i++) {
    
    			$row_bp = sql_fetch_array($result_bp);
    			$timeStamp = timeStamp($row_bp["tdate"]);
    			$receipt .= "  ".substr($timeStamp.$blank, 0, 10)
    				.substr($row_bp["register_no"].$blank, 0, 7)
    				.substr($row_bp["trans_no"].$blank, 0, 6)
    				.substr($row_bp["emp_no"].$blank, 0, 6)
    				.substr($blank.($row_bp["upc"]), -10)
    				.substr($blank.number_format($row_bp["total"], 2), -10)."\n";
    		}
    
    		$receipt.= centerString("------------------------------------------------------");
    	}
    	else {
    		$receipt .= "\n\n".centerString(" * * *   N O N E   * * * ")."\n\n"
    			.centerString("------------------------------------------------------");
    	}
    */
    $receipt .= str_repeat("\n", 8);
    // apbw/tt 3/16/05 Franking II
    // ccm-rle - this creates a txt log on the IS4C computer of every tender report for logging purposes
    $tender_date = date('Y-m-d-H-i-s');
    $tender_log_file = "/pos/logs/tenderlog_" . $tender_date . "_" . $_SESSION["laneno"] . ".txt";
    $fp = fopen($tender_log_file, 'w');
    fwrite($fp, $receipt . chr(27) . chr(105));
    fclose($fp);
    writeLine($receipt . chr(27) . chr(105));
    // apbw/tt 3/16/05 Franking II
    sql_close($db_a);
    $_SESSION["msgrepeat"] = 1;
    $_SESSION["strRemembered"] = "ES";
    gohome();
}
开发者ID:Robbt,项目名称:CCM-IS4C,代码行数:101,代码来源:tenderReport.php


示例5: loginscreen

function loginscreen()
{
    gohome();
}
开发者ID:WedgeCoop,项目名称:IS4C,代码行数:4,代码来源:clientscripts.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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