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


PHP UnsetSession函数代码示例

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


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

示例1: HandleToDo

 public function HandleToDo($Do)
 {
     $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Orders') => 'index.php?ToDo=viewOrders');
     switch (isc_strtolower($Do)) {
         case 'viewsales':
         default:
             if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Orders)) {
                 if (isset($_GET['searchQuery'])) {
                     $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Orders') => "index.php?ToDo=viewOrders", GetLang('SearchResults') => "index.php?ToDo=viewOrders");
                 } else {
                     $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Orders') => "index.php?ToDo=viewOrders");
                 }
                 if (GetSession('ordersearch') > 0) {
                     if (!isset($_GET['searchId'])) {
                         $_GET['searchId'] = GetSession('ordersearch');
                         $_REQUEST['searchId'] = GetSession('ordersearch');
                     }
                     if ($_GET['searchId'] > 0) {
                         $GLOBALS['BreadcrumEntries'] = array_merge($GLOBALS['BreadcrumEntries'], array(GetLang('CustomView') => "index.php?ToDo=customOrderSearch"));
                     }
                 }
                 if (!isset($_REQUEST['ajax'])) {
                     $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader();
                 }
                 if (GetSession('ordersearch') > 0) {
                     $this->CustomSearch();
                 } else {
                     UnsetSession('ordersearch');
                     $this->ManageOrders();
                 }
                 if (!isset($_REQUEST['ajax'])) {
                     $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter();
                 }
             } else {
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
             }
     }
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:38,代码来源:class.sales_aug04.php

示例2: HandleToDo


//.........这里部分代码省略.........
             if ($GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Manage_Products)) {
                 $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Products') => "index.php?ToDo=viewProducts", GetLang('SearchProducts') => "index.php?ToDo=searchProducts");
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader();
                 $this->SearchProducts();
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter();
             } else {
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
             }
             break;
         case "popupproductselect":
             $this->PopupProductSelect();
             break;
         case "deleteproductsearchresults":
             if ($GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Delete_Products)) {
                 $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Products') => "index.php?ToDo=viewProducts");
                 if (GetSession('productsearch') > 0) {
                     if (!isset($_GET['searchId'])) {
                         $_GET['searchId'] = GetSession('productsearch');
                         $_REQUEST['searchId'] = GetSession('productsearch');
                     }
                     if ($_GET['searchId'] > 0) {
                         $GLOBALS['BreadcrumEntries'] = array_merge($GLOBALS['BreadcrumEntries'], array(GetLang('CustomView') => "index.php?ToDo=customProductSearch"));
                     }
                 }
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader();
                 $this->DeleteSearchResults();
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter();
                 die;
             } else {
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
             }
             break;
         case "copyproduct":
             if ($GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Create_Product)) {
                 $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Products') => "index.php?ToDo=viewProducts", GetLang('CopyProduct') => "index.php?ToDo=copyProduct");
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader();
                 $this->CopyProductStep1();
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter();
                 die;
             } else {
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
             }
             break;
         case "copyproduct2":
             if ($GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Create_Product)) {
                 if (isset($_POST['addanother'])) {
                     $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Products') => "index.php?ToDo=viewProducts", GetLang('CopyProduct') => "index.php?ToDo=addProduct");
                 } else {
                     $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Products') => "index.php?ToDo=viewProducts");
                     if (GetSession('productsearch') > 0) {
                         if (!isset($_GET['searchId'])) {
                             $_GET['searchId'] = GetSession('productsearch');
                             $_REQUEST['searchId'] = GetSession('productsearch');
                         }
                         if ($_GET['searchId'] > 0) {
                             $GLOBALS['BreadcrumEntries'] = array_merge($GLOBALS['BreadcrumEntries'], array(GetLang('CustomView') => "index.php?ToDo=customProductSearch"));
                         }
                     }
                 }
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader();
                 $this->CopyProductStep2();
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter();
                 die;
             } else {
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
             }
             break;
         default:
             if ($GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Manage_Products)) {
                 if (isset($_GET['searchQuery'])) {
                     $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Products') => "index.php?ToDo=viewProducts", GetLang('SearchResults') => "index.php?ToDo=viewProducts");
                 } else {
                     $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Products') => "index.php?ToDo=viewProducts");
                 }
                 if (GetSession('productsearch') > 0) {
                     if (!isset($_GET['searchId'])) {
                         $_GET['searchId'] = GetSession('productsearch');
                         $_REQUEST['searchId'] = GetSession('productsearch');
                     }
                     if ($_GET['searchId'] > 0) {
                         $GLOBALS['BreadcrumEntries'] = array_merge($GLOBALS['BreadcrumEntries'], array(GetLang('CustomView') => "index.php?ToDo=customProductSearch"));
                     }
                 }
                 if (!isset($_REQUEST['ajax'])) {
                     $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader();
                 }
                 if (GetSession('productsearch') > 0) {
                     $this->CustomSearch();
                 } else {
                     UnsetSession('productsearch');
                     $this->ManageProducts();
                 }
                 if (!isset($_REQUEST['ajax'])) {
                     $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter();
                 }
             } else {
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
             }
     }
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:101,代码来源:class.product_18_12.php

示例3: MultiFormLogic

function MultiFormLogic()
{
    global $bMultiForm, $SPECIAL_VALUES, $aServerVars, $aFileVars;
    global $sFormMailScript, $bGotGoBack, $bGotNextForm, $iFormIndex;
    global $aFieldOrder, $aCleanedValues, $aRawDataValues, $aAllRawValues;
    if ($SPECIAL_VALUES["multi_start"] == 1) {
        if (empty($SPECIAL_VALUES["this_form"])) {
            ErrorWithIgnore("need_this_form", GetMessage(MSG_NEED_THIS_FORM), false, false);
        }
        $bMultiForm = true;
        //
        // Start of multi-page form sequence
        //
        $a_list = array();
        $a_list[0] = array("URL" => $SPECIAL_VALUES["this_form"], "ORDER" => $aFieldOrder, "CLEAN" => $aCleanedValues, "RAWDATA" => $aRawDataValues, "ALLDATA" => $aAllRawValues, "FILES" => $aFileVars);
        $iFormIndex = 0;
        // zero is the first form, which was just submitted
        SetSession("FormList", $a_list);
        SetSession("FormIndex", $iFormIndex);
        //
        // this is a fresh session, so remove any remembered values
        //
        UnsetSession("FormSavedFiles");
        UnsetSession("FormKeep");
    } elseif (IsSetSession("FormList")) {
        $bMultiForm = true;
    }
    if ($bMultiForm) {
        if (isset($aServerVars["PHP_SELF"]) && !empty($aServerVars["PHP_SELF"]) && isset($aServerVars["SERVER_NAME"]) && !empty($aServerVars["SERVER_NAME"])) {
            if (isset($aServerVars["SERVER_PORT"]) && $aServerVars["SERVER_PORT"] != 80) {
                if ($aServerVars["SERVER_PORT"] == 443) {
                    // SSL port
                    //
                    // just use https prefix
                    //
                    $sFormMailScript = "https://" . $aServerVars["SERVER_NAME"] . $aServerVars["PHP_SELF"];
                } else {
                    //
                    // use http with port number
                    //
                    $sFormMailScript = "http://" . $aServerVars["SERVER_NAME"] . ":" . $aServerVars["SERVER_PORT"] . $aServerVars["PHP_SELF"];
                }
            } else {
                $sFormMailScript = "http://" . $aServerVars["SERVER_NAME"] . $aServerVars["PHP_SELF"];
            }
            $iFormIndex = GetSession("FormIndex");
        } else {
            Error("no_php_self", GetMessage(MSG_NO_PHP_SELF), false, false);
        }
    }
    //
    // If we're going forward in a multi-page form sequence,
    // compute a URL to return to the form we're about to display.
    //
    if ($bMultiForm && !$bGotGoBack) {
        //
        // record the data that was just submitted by the previous form
        //
        $iFormIndex = GetSession("FormIndex");
        $a_list = GetSession("FormList");
        $a_list[$iFormIndex]["ORDER"] = $aFieldOrder;
        $a_list[$iFormIndex]["CLEAN"] = $aCleanedValues;
        $a_list[$iFormIndex]["RAWDATA"] = $aRawDataValues;
        $a_list[$iFormIndex]["ALLDATA"] = $aAllRawValues;
        if (count($aFileVars) > 0 && !FILEUPLOADS) {
            SendAlert(GetMessage(MSG_FILE_UPLOAD));
        } elseif (count($aFileVars) > 0 && !SaveAllUploadedFiles($aFileVars)) {
            Error("upload_save_failed", GetMessage(MSG_MULTI_UPLOAD), false, false);
        }
        $a_list[$iFormIndex]["FILES"] = $aFileVars;
        $iFormIndex++;
        $s_url = GetReturnLink($sFormMailScript, $iFormIndex);
        $a_list[$iFormIndex] = array("URL" => $s_url, "FORM" => $SPECIAL_VALUES["next_form"], "ORDER" => $aFieldOrder, "CLEAN" => $aCleanedValues, "RAWDATA" => $aRawDataValues, "ALLDATA" => $aAllRawValues, "FILES" => $aFileVars);
        SetSession("FormList", $a_list);
        SetSession("FormIndex", $iFormIndex);
        MultiKeep();
    }
}
开发者ID:chrismathers,项目名称:premierplacement,代码行数:78,代码来源:resumemailer_061612.php

示例4: HandleToDo


//.........这里部分代码省略.........
             }
             break;
         case "viewsingleorder":
             if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Orders)) {
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader();
                 $output = ISC_ADMIN_REMOTE::GetOrderQuickView();
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter();
                 echo $output;
             }
             break;
         case "updatemultiorderstatus":
             if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Orders)) {
                 $GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate("pageheader.popup");
                 $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();
                 $this->updateOrderStatusBox();
                 $GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate("pagefooter.popup");
                 $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();
             } else {
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
             }
             break;
         case "refundorder":
             if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Orders)) {
                 $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Orders') => "index.php?ToDo=viewOrders");
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader();
                 $this->RefundOrder();
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter();
             } else {
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
             }
             break;
             /* Added for Save and Pay -- Baskaran */
         /* Added for Save and Pay -- Baskaran */
         case "payorder":
             if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Orders)) {
                 $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Orders') => "index.php?ToDo=viewOrders", GetLang('PayOrder') => "index.php?ToDo=viewOrderMessages");
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader();
                 $this->payOrder();
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter();
             } else {
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
             }
             break;
         case "paymentorder":
             if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Orders)) {
                 $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Orders') => "index.php?ToDo=viewOrders", GetLang('PayOrder') => "index.php?ToDo=viewOrderMessages");
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader();
                 $this->PaymentOrder();
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter();
             } else {
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
             }
             break;
             //Wirror_20110301: confirm the order
         //Wirror_20110301: confirm the order
         case "confirmorder":
             if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Orders)) {
                 $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Orders') => "index.php?ToDo=viewOrders", GetLang('ConfirmOrder') => 'index.php?ToDo=confirmOrder');
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader();
                 $this->ConfirmOrder();
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter();
             } else {
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
             }
             break;
             /* Baskaran */
         /* Baskaran */
         default:
             if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Orders)) {
                 if (isset($_GET['searchQuery'])) {
                     $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Orders') => "index.php?ToDo=viewOrders", GetLang('SearchResults') => "index.php?ToDo=viewOrders");
                 } else {
                     $GLOBALS['BreadcrumEntries'] = array(GetLang('Home') => "index.php", GetLang('Orders') => "index.php?ToDo=viewOrders");
                 }
                 if (GetSession('ordersearch') > 0) {
                     if (!isset($_GET['searchId'])) {
                         $_GET['searchId'] = GetSession('ordersearch');
                         $_REQUEST['searchId'] = GetSession('ordersearch');
                     }
                     if ($_GET['searchId'] > 0) {
                         $GLOBALS['BreadcrumEntries'] = array_merge($GLOBALS['BreadcrumEntries'], array(GetLang('CustomView') => "index.php?ToDo=customOrderSearch"));
                     }
                 }
                 if (!isset($_REQUEST['ajax'])) {
                     $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader();
                 }
                 if (GetSession('ordersearch') > 0) {
                     $this->CustomSearch();
                 } else {
                     UnsetSession('ordersearch');
                     $this->ManageOrders();
                 }
                 if (!isset($_REQUEST['ajax'])) {
                     $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter();
                 }
             } else {
                 $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
             }
     }
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:101,代码来源:class.orders.php

示例5: DeleteCustomSearch

		protected function DeleteCustomSearch()
		{

			if($GLOBALS['ISC_CLASS_ADMIN_CUSTOMSEARCH']->DeleteSearch($_GET['searchId'])) {
				// remove the saved search from the session to default to All Orders
				UnsetSession('ordersearch');

				// Log this action
				$GLOBALS['ISC_CLASS_LOG']->LogAdminAction($_GET['searchId']);

				$this->ManageOrders(GetLang('DeleteCustomSearchSuccess'), MSG_SUCCESS);
			}
			else {
				$this->ManageOrders(GetLang('DeleteCustomSearchFailed'), MSG_ERROR);
			}
		}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:16,代码来源:class.orders.php


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