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


PHP goURL函数代码示例

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


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

示例1: verify

 function verify($username, $password)
 {
     $querystatement = "\n\t\t\tSELECT\n\t\t\t\tid,\n\t\t\t\tuuid,\n\t\t\t\tfirstname,\n\t\t\t\tlastname,\n\t\t\t\temail,\n\t\t\t\tphone,\n\t\t\t\tdepartment,\n\t\t\t\temployeenumber,\n\t\t\t\tadmin,\n\t\t\t\tmailer,\n\t\t\t\tsendmail,\n\t\t\t\tsmtpauth,\n\t\t\t\tsmtpsecure,\n\t\t\t\tsmtpport,\n\t\t\t\tsmtpuser,\n\t\t\t\tsmtppass,\n\t\t\t\tsmtphost\n\t\t\tFROM\n\t\t\t\tusers\n\t\t\tWHERE\n\t\t\t\tlogin = '" . mysql_real_escape_string($username) . "'\n\t\t\t\tAND password = ENCODE('" . mysql_real_escape_string($password) . "','" . mysql_real_escape_string(ENCRYPTION_SEED) . "')\n\t\t\t\tAND revoked = 0\n\t\t\t\tAND portalaccess = 0";
     $queryresult = $this->db->query($querystatement);
     if ($this->db->numRows($queryresult)) {
         //We found a record that matches in the database
         // populate the session and go in
         $_SESSION["userinfo"] = $this->db->fetchArray($queryresult);
         // Next get the users roles, and populate the session with them
         $_SESSION["userinfo"]["roles"] = array();
         $querystatement = "\n\t\t\t\tSELECT\n\t\t\t\t\troleid\n\t\t\t\tFROM\n\t\t\t\t\trolestousers\n\t\t\t\tWHERE userid = '" . $_SESSION["userinfo"]["uuid"] . "'";
         $rolesqueryresult = $this->db->query($querystatement);
         while ($rolerecord = $this->db->fetchArray($rolesqueryresult)) {
             $_SESSION["userinfo"]["roles"][] = $rolerecord["roleid"];
         }
         //Retrieve and Setup User Preferences
         $_SESSION["userinfo"]["prefs"] = array();
         $querystatement = "\n\t\t\t\tSELECT\n\t\t\t\t\t`name`,\n\t\t\t\t\t`value`\n\t\t\t\tFROM\n\t\t\t\t\t`userpreferences`\n\t\t\t\tWHERE\n\t\t\t\t\t`userid` = " . $_SESSION["userinfo"]["id"];
         $queryresult = $this->db->query($querystatement);
         while ($prefsrecord = $this->db->fetchArray($queryresult)) {
             $_SESSION["userinfo"]["prefs"][$prefsrecord["name"]] = $prefsrecord["value"];
         }
         //update lastlogin
         $ip = $_SERVER["REMOTE_ADDR"];
         $updatestatement = "\n\t\t\t\tUPDATE\n\t\t\t\t\tusers\n\t\t\t\tSET\n\t\t\t\t\tmodifieddate = modifieddate,\n\t\t\t\t\tlastlogin = Now(),\n\t\t\t\t\t`lastip` = '" . $ip . "'\n\t\t\t\tWHERE\n\t\t\t\t\tid = " . $_SESSION["userinfo"]["id"];
         $this->db->query($updatestatement);
         $_SESSION["tableparams"] = array();
         goURL(DEFAULT_LOAD_PAGE);
     } else {
         //log login attempt
         $log = new phpbmsLog("Login attempt failed for user '" . $username . "'", "SECURITY");
         return "Login Failed";
     }
     //endif numrows
 }
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:35,代码来源:login_include.php

示例2: getTableDef

 function getTableDef($id)
 {
     $querystatement = "\n\t\t\t\tSELECT\n\t\t\t\t\ttabledefs.id,\n\t\t\t\t\ttabledefs.uuid,\n\t\t\t\t\tmaintable,\n\t\t\t\t\tquerytable,\n\t\t\t\t\ttabledefs.displayname,\n\t\t\t\t\taddfile,\n\t\t\t\t\teditfile,\n\t\t\t\t\timportfile,\n\t\t\t\t\tdeletebutton,\n\t\t\t\t\ttype,\n\t\t\t\t\tdefaultwhereclause,\n\t\t\t\t\tdefaultsortorder,\n\t\t\t\t\tdefaultsearchtype,\n\t\t\t\t\tdefaultcriteriafindoptions,\n\t\t\t\t\tdefaultcriteriaselection,\n\t\t\t\t\tmodules.name,\n\t\t\t\t\tsearchroleid,\n\t\t\t\t\tadvsearchroleid,\n\t\t\t\t\tviewsqlroleid,\n                                        editroleid,\n                                        addroleid\n\t\t\t\tFROM\n\t\t\t\t\ttabledefs INNER JOIN modules on tabledefs.moduleid = modules.uuid\n\t\t\t\tWHERE\n\t\t\t\t\ttabledefs.uuid= '" . $id . "'";
     $queryresult = $this->db->query($querystatement);
     if ($this->db->numRows($queryresult) < 1) {
         $error = new appError(1, "table definition not found: " . $id);
     }
     $therecord = $this->db->fetchArray($queryresult);
     if (!hasRights($therecord["searchroleid"])) {
         goURL(APP_PATH . "noaccess.php");
     }
     return $therecord;
 }
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:13,代码来源:search_class.php

示例3: processImportPage

 function processImportPage()
 {
     $this->table->getTableInfo();
     if (isset($_POST["pageType"])) {
         $this->pageType = $_POST["pageType"];
     }
     if (isset($_POST["tempFileID"])) {
         $this->tempFileID = (int) $_POST["tempFileID"];
     }
     if (!isset($_POST["command"])) {
         //happens upon first coming to page
         //remove any other temporary csv files in the `files` table
         //present from previous imports
         $this->_removeTempCSV();
         //check to see if user has the rights to be here.
         //If not, kick him to the no access page.
         if (!hasRights($this->table->importroleid)) {
             goURL(APP_PATH . "noaccess.php");
         }
     } else {
         //form has been submitted
         switch ($_POST["command"]) {
             //cancel button pressed.
             case "cancel":
                 //Cancel button needs to do different things depending upon which page
                 //its at.
                 if ($this->pageType == "main") {
                     goURL($this->table->backurl);
                 } else {
                     $this->_removeTempCSV($this->tempFileID);
                     $therecord["phpbmsStatus"] = "Record(s) Not Imported";
                     $this->pageType = "main";
                 }
                 //end if
                 break;
             case "upload":
                 //check for valid file upload
                 if (!$_FILES["import"]["error"] && $_FILES["import"]["size"] > 0) {
                     //check and parse the file
                     if ($this->_parseFromData($_FILES["import"]["tmp_name"])) {
                         //start transaction
                         $this->table->db->startTransaction();
                         $this->importRecords($this->parser->data, $this->parser->titles);
                         //get data for preview purposes
                         $this->_getTransactionData();
                         //"undo" any inserts
                         $this->table->db->rollbackTransaction();
                         //DO NOT CALL IN TRANSACTION
                         //ALTER TABLES AUTO COMMIT AND THE FILE NEEDS TO CARRY
                         //OVER.
                         $this->_revertAutoIncrement($this->revertID);
                         $this->_storeTempCSV($_FILES["import"]["tmp_name"]);
                     }
                     //end if
                 } else {
                     $this->docError .= "failed file upload";
                 }
                 //switch page types
                 $this->pageType = "confirm";
                 if (!$this->error && !$this->docError) {
                     $therecord["phpbmsStatus"] = "Confirm Import";
                 } elseif ($this->docError) {
                     $therecord["phpbmsStatus"] = "Import Error: " . $this->docError;
                     $this->pageType = "main";
                 } else {
                     $therecord["phpbmsStatus"] = "Import Error";
                 }
                 break;
             case "import":
                 //get the contents of the stored csv document
                 $CSVcontents = $this->_getTempCSV($this->tempFileID);
                 //parser uses newline character to be able to parse the last line
                 if (substr($CSVcontents, -1, 1) != "\n") {
                     $CSVcontents .= "\n";
                 }
                 $this->parser->parse($CSVcontents);
                 $this->importRecords($this->parser->data, $this->parser->titles);
                 $this->table->db->commitTransaction();
                 //DO NOT CALL IN TRANSACTION
                 //get rid of temporary csv document
                 $this->_removeTempCSV($this->tempFileID);
                 $therecord["phpbmsStatus"] = "Record(s) Imported";
                 //change page type
                 $this->pageType = "main";
                 break;
         }
         //end command switch
     }
     // end if
     //display the title
     $therecord["title"] = $this->table->displayname . " Import";
     return $therecord;
 }
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:93,代码来源:imports.php

示例4: massEmail

 function massEmail()
 {
     if (DEMO_ENABLED != "true") {
         $_SESSION["emailids"] = $this->idsArray;
         goURL("modules/mailchimp/manual_list_sync.php");
     } else {
         return "mass e-mail feature disabled in demo";
     }
 }
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:9,代码来源:clients.php

示例5: donePrinting

 function donePrinting($backurl)
 {
     if (!$backurl) {
         goURL("search.php?id=" . $this->tableid);
     } else {
         goURL($backurl);
     }
 }
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:8,代码来源:print_class.php

示例6: dateToString

if (!isset($_POST["fromdate"])) {
    $_POST["fromdate"] = dateToString(strtotime("-1 year"));
}
if (!isset($_POST["todate"])) {
    $_POST["todate"] = dateToString(mktime());
}
if (!isset($_POST["status"])) {
    $_POST["status"] = "Orders and Invoices";
}
if (!isset($_POST["command"])) {
    $_POST["command"] = "show";
}
if ($_POST["command"] == "print") {
    $_SESSION["printing"]["whereclause"] = "clients.id=" . $_GET["id"];
    $_SESSION["printing"]["dataprint"] = "Single Record";
    goURL("report/clients_purchasehistory.php?rid=" . urlencode("rpt:1908b03c-cacc-f03a-6d22-21fdef123f65") . "&tid=" . urlencode("tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083") . "&status=" . urlencode($_POST["status"]) . "&fromdate=" . urlencode($_POST["fromdate"]) . "&todate=" . urlencode($_POST["todate"]));
} else {
    $pageTitle = "Client Purchase History: ";
    if ($clientrecord["company"] == "") {
        $pageTitle .= $clientrecord["firstname"] . " " . $clientrecord["lastname"];
    } else {
        $pageTitle .= $clientrecord["company"];
    }
    $thestatus = "(invoices.type =\"";
    switch ($_POST["status"]) {
        case "Orders and Invoices":
            $thestatus .= "Order\" or invoices.type=\"Invoice\")";
            break;
        case "Invoices":
            $thestatus .= "Invoice\")";
            break;
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:31,代码来源:clients_purchasehistory.php

示例7: goURL

                                <input type="submit" name="go" value="Đến"/>
                            </td>
                            <td id="next">' . $url['next'] . '</td>
                        </tr>
                    </table>
                </form>
            </div>
            <div class="tips">
                <img src="icon/tips.png"/>
                <span>Ấn tiếp tục để lưu lại ở lại trang và ấn lưu để lưu lại và quay về danh sách dòng</span>
            </div>
            <div class="title">Chức năng</div>
            <ul class="list">
                <li><img src="icon/delete.png"/> <a href="delete_line.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '&line=' . $line . $page['paramater_1'] . '">Xóa dòng</a></li>
                <li><img src="icon/edit_text_line.png"/> <a href="edit_text_line.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . $page['paramater_1'] . '#line_number_' . $line . '">Sửa theo dòng</a></li>
                <li><img src="icon/edit.png"/> <a href="edit_text.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '">Sửa văn bản</a></li>
                <li><img src="icon/download.png"/> <a href="file_download.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '">Tải về</a></li>
                <li><img src="icon/info.png"/> <a href="file.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '">Thông tin</a></li>
                <li><img src="icon/rename.png"/> <a href="file_rename.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '">Đổi tên</a></li>
                <li><img src="icon/copy.png"/> <a href="file_copy.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '">Sao chép</a></li>
                <li><img src="icon/move.png"/> <a href="file_move.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '">Di chuyển</a></li>
                <li><img src="icon/delete.png"/> <a href="file_delete.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '">Xóa</a></li>
                <li><img src="icon/access.png"/> <a href="file_chmod.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '">Chmod</a></li>
                <li><img src="icon/list.png"/> <a href="index.php?dir=' . $dirEncode . $pages['paramater_1'] . '">Danh sách</a></li>
            </ul>';
        }
    }
} else {
    goURL('login.php');
}
include_once 'footer.php';
开发者ID:TauThickMi,项目名称:M,代码行数:31,代码来源:edit_line.php

示例8: goURL

<?php

if (!$GO_MODULES->write_permissions) {
    goURL('index.php');
}
?>

<form name="frmProduct" method="post" enctype="multipart/form-data">
	<input name="id" type="hidden" value="<?php 
echo $_POST['id'];
?>
">
	<input name="task" type="hidden">
	<input name="close_win" type="hidden">
<table width="100%"	border="0" cellspacing="0" cellpadding="0">
<tr>
	<td width="1%" nowrap>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
    	<td width="1%" align="right" nowrap><?php 
echo $sc_product_name;
?>
 :&nbsp;</td>
	    <td><input type="text" class="textbox" name="product" value="<?php 
echo $name;
?>
"></td>
	  </tr>
	  <tr>
    	<td width="1%" align="right" nowrap><?php 
echo $sc_part_number;
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:edit_product.tmp.php

示例9: foreach

 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   |
 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    |
 |                                                                         |
 +-------------------------------------------------------------------------+
*/
require_once "../../include/session.php";
require_once "include/fields.php";
foreach ($phpbms->modules as $module => $moduleinfo) {
    if ($module != "base" && file_exists("../" . $module . "/adminsettings.php")) {
        include "modules/" . $module . "/adminsettings.php";
    }
}
require_once "modules/base/include/adminsettings_include.php";
$settings = new settings($db);
if (!hasRights("Admin")) {
    goURL(APP_PATH . "noaccess.php");
}
if (isset($_POST["command"])) {
    $statusmessage = $settings->processForm($_POST);
}
$therecord = $settings->getSettings();
$pageTitle = "Configuration";
$phpbms->cssIncludes[] = "pages/base/adminsettings.css";
$phpbms->jsIncludes[] = "modules/base/javascript/adminsettings.js";
foreach ($phpbms->modules as $module => $moduleinfo) {
    if ($module != "base" && file_exists("../" . $module . "/javascript/adminsettings.js")) {
        $phpbms->jsIncludes[] = "modules/" . $module . "/javascript/adminsettings.js";
    }
}
//Form Elements
//==============================================================
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:31,代码来源:adminsettings.php

示例10: run_aging

 function run_aging()
 {
     goURL("modules/bms/aritems_aging.php");
 }
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:4,代码来源:aritems.php

示例11: foreach

    //convert any checked records to an array of ids
    foreach ($HTTP_POST_VARS as $key => $value) {
        if (substr($key, 0, 5) == "check") {
            $theids[] = $value;
        }
    }
    //Search Options Command Process
    //=====================================================================================================
    switch ($command) {
        case "new":
            // relocate to new screen
            //=====================================================================================================
            $theurl = getAddEditFile($db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1") . "?reftable=" . $reftable . "&refid=" . $_GET["refid"] . "&backurl=" . $backurl;
            goURL($theurl);
            break;
        case "delete":
            //a bit more complicated so we'll put it in it's own function?
            //=====================================================================================================
            include_once "modules/base/include/notes.php";
            $searchFunctions = new notesSearchFunctions($db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1", $theids);
            $statusmessage = $searchFunctions->delete_record();
            break;
        case "edit/view":
            // relocate to edit screen
            //=====================================================================================================
            goURL(getAddEditFile($db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1") . "?id=" . $theids[0] . "&refid=" . $_GET["refid"] . "&backurl=" . $backurl);
            break;
    }
    //end switch
}
//end if
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:31,代码来源:notes_records_process.php

示例12: dateToString

if (!isset($_POST["todate"])) {
    $_POST["todate"] = dateToString(mktime());
}
if (!isset($_POST["status"])) {
    $_POST["status"] = "Orders and Invoices";
}
if (!isset($_POST["command"])) {
    $_POST["command"] = "show";
}
if (!isset($_POST["date_order"])) {
    $_POST["date_order"] = "DESC";
}
if ($_POST["command"] == "print") {
    $_SESSION["printing"]["whereclause"] = "products.id=" . $_GET["id"];
    $_SESSION["printing"]["dataprint"] = "Single Record";
    goURL("report/products_saleshistory.php?rid=" . urlencode("rpt:a278af28-9c34-da2e-d81b-4caa36dfa29f") . "&tid=" . urlencode("tbld:7a9e87ed-d165-c4a4-d9b9-0a4adc3c5a34") . "&status=" . urlencode($_POST["status"]) . "&fromdate=" . urlencode($_POST["fromdate"]) . "&todate=" . urlencode($_POST["todate"]));
} else {
    $thestatus = "(invoices.type =\"";
    switch ($_POST["status"]) {
        case "Orders and Invoices":
            $thestatus .= "Order\" or invoices.type=\"Invoice\")";
            $searchdate = "orderdate";
            break;
        case "Invoices":
            $thestatus .= "Invoice\")";
            $searchdate = "invoicedate";
            break;
        case "Orders":
            $thestatus .= "Order\")";
            $searchdate = "orderdate";
            break;
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:31,代码来源:products_saleshistory.php

示例13: db

        $phpbmsSession->loadDBSettings(APP_DEBUG);
        if (!APP_DEBUG) {
            $phpbmsSession->checkForInstallDirs();
        }
        //start database
        include_once "include/db.php";
        $db = new db();
        $phpbmsSession->db = $db;
        //load application settings from table
        $phpbmsSession->loadSettings($sqlEncoding);
        include_once "common_functions.php";
        $phpbms = new phpbms($db);
        if (!isset($noSession)) {
            $phpbmsSession->startSession();
        }
        if (!isset($_SESSION["userinfo"]) && $scriptname != "index.php") {
            if (isset($loginNoKick)) {
                if (!isset($loginNoDisplayError)) {
                    exit;
                }
            } else {
                goURL(APP_PATH . "index.php");
            }
            //endif
        }
        //endif iseet userinfo
    }
    //endif
    $db->stopOnError = true;
}
//end if
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:31,代码来源:session.php

示例14: clientConsolidator

                </p>
                <p align="right">
                    <input name="command" type="submit" class="Buttons" id="done" value="done"/>
                </p>

            </div>
        </form>
        <?php 
        include "footer.php";
    }
}
//end class clientConsolidator
/**
 * PROCESSING ==================================================================
 */
if (!isset($noOutput)) {
    require_once "../../include/session.php";
    $consolidator = new clientConsolidator($db);
    $_POST = addSlashesToArray($_POST);
    if (!isset($_POST["command"])) {
        $error = new appError(200, "passed parameters are not set");
    }
    if ($_POST["command"] === "cancel" || $_POST["command"] === "done") {
        goURL("../../search.php?id=tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083");
    }
    if (!isset($_POST["consolidateTo"]) || !isset($_POST["uuidsArray"])) {
        $error = new appError(200, "passed parameters are not set");
    }
    $consolidator->consolidate($_POST["consolidateTo"], $_POST["uuidsArray"]);
}
//endif
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:31,代码来源:clients_consolidate.php

示例15: VALUES

        }
        $db->query("DELETE FROM ab_config WHERE page = '{$page}' AND user_id = '{$user}'");
        if (!empty($order_all)) {
            $db->query("INSERT INTO ab_config VALUES('{$page}', '{$user}', '{$com}', '{$order_all}')");
        }
    case 'return_to':
        require_once $GO_CONFIG->root_path . 'lib/tkdlib.php';
        switch ($page) {
            case $constContactsPage:
                goURL("index.php?post_action=browse&addressbook_id=" . $_REQUEST['addressbook_id']);
                break;
            case $constCompaniesPage:
                goURL("index.php?post_action=companies&addressbook_id=" . $_REQUEST['addressbook_id'] . "&first=" . $_REQUEST['first'] . "&max_rows=" . $_REQUEST['max_rows'] . "&treeview=" . $_REQUEST['treeview']);
                break;
            case $constMembersPage:
                goURL("index.php?post_action=members&addressbook_id=" . $_REQUEST['addressbook_id']);
                break;
        }
}
$db->query("SELECT order_fields, order_all FROM ab_config WHERE page = '{$page}' AND user_id = '{$user}'");
if ($db->next_record()) {
    $com = explode(",", $db->f('order_fields'));
    $s = $db->f('order_all');
    if (!empty($s)) {
        $order_all = explode(",", $db->f('order_all'));
    }
}
if ($db->num_rows() == 0) {
    switch ($page) {
        case $constContactsPage:
            $com[] = "email";
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:edit_config.php


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