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

PHP ew_ServerVar函数代码示例

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

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



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

示例1: SaveLastUrl

 function SaveLastUrl()
 {
     $s = ew_ServerVar("SCRIPT_NAME");
     $q = ew_ServerVar("QUERY_STRING");
     if ($q != "") {
         $s .= "?" . $q;
     }
     if ($this->LastUrl() == $s) {
         $s = "";
     }
     @setcookie(EW_PROJECT_NAME . '[LastUrl]', $s);
 }
开发者ID:Razinsky,项目名称:echaude-com,代码行数:12,代码来源:phpfn8.php


示例2: getReturnUrl

 function getReturnUrl()
 {
     $name = EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL;
     // Get referer URL automatically
     if (ew_ServerVar("HTTP_REFERER") != "" && ew_ReferPage() != ew_CurrentPage() && ew_ReferPage() != "login.php") {
         // Referer not same page or login page
         $_SESSION[$name] = ew_ServerVar("HTTP_REFERER");
     }
     // Save to Session
     if (@$_SESSION[$name] != "") {
         return $_SESSION[$name];
     } else {
         return "card_typelist.php";
     }
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:15,代码来源:card_typeinfo.php


示例3: ew_UploadPathEx

 if ($restoreDbFile) {
     $fn = ew_UploadPathEx(TRUE, @$_GET["path"]) . $obj->Value;
     if (file_exists($fn)) {
         $pathinfo = pathinfo($fn);
         $ext = strtolower($pathinfo['extension']);
         if (in_array($ext, explode(',', EW_IMAGE_ALLOWED_FILE_EXT))) {
             $size = getimagesize($fn);
             if ($size) {
                 header("Content-type: {$size['mime']}");
             }
             echo ew_ResizeFileToBinary($fn, $width, $height, $quality);
         }
     }
 } else {
     // If not IE, get the content type
     if (strpos(ew_ServerVar("HTTP_USER_AGENT"), "MSIE") === FALSE) {
         $tmpfname = tempnam(ew_TmpFolder(), 'tmp');
         $handle = fopen($tmpfname, "w");
         fwrite($handle, $obj->Value);
         fclose($handle);
         $size = getimagesize($tmpfname);
         if ($size) {
             header("Content-type: {$size['mime']}");
         }
         @unlink($tmpfname);
     }
     if ($resize) {
         $obj->Resize($width, $height, $quality);
     }
     echo $obj->Value;
     exit;
开发者ID:huynt57,项目名称:bluebee-uet.com,代码行数:31,代码来源:ewbv9.php


示例4: Page_Main

 function Page_Main()
 {
     // Get key
     if (@$_GET["rider_id"] != "") {
         $this->rider_id->setQueryStringValue($_GET["rider_id"]);
     } else {
         $this->Page_Terminate();
         // Exit
         exit;
     }
     $objBinary = new cUpload('rider', 'x_rider_pic');
     // Show thumbnail
     $bShowThumbnail = @$_GET["showthumbnail"] == "1";
     if (@$_GET["thumbnailwidth"] == "" && @$_GET["thumbnailheight"] == "") {
         $iThumbnailWidth = EW_THUMBNAIL_DEFAULT_WIDTH;
         // Set default width
         $iThumbnailHeight = EW_THUMBNAIL_DEFAULT_HEIGHT;
         // Set default height
     } else {
         if (@$_GET["thumbnailwidth"] != "") {
             $iThumbnailWidth = $_GET["thumbnailwidth"];
             if (!is_numeric($iThumbnailWidth) || $iThumbnailWidth < 0) {
                 $iThumbnailWidth = 0;
             }
         }
         if (@$_GET["thumbnailheight"] != "") {
             $iThumbnailHeight = $_GET["thumbnailheight"];
             if (!is_numeric($iThumbnailHeight) || $iThumbnailHeight < 0) {
                 $iThumbnailHeight = 0;
             }
         }
     }
     $sFilter = $this->KeyFilter();
     // Set up filter (SQL WHERE clause) and get return SQL
     // SQL constructor in rider class, riderinfo.php
     $this->CurrentFilter = $sFilter;
     $sSql = $this->SQL();
     $conn =& $this->Connection();
     if ($this->Recordset = $conn->Execute($sSql)) {
         if (!$this->Recordset->EOF) {
             if (ob_get_length()) {
                 ob_end_clean();
             }
             $objBinary->Value = $this->Recordset->fields('rider_pic');
             $objBinary->Value = $objBinary->Value;
             if ($bShowThumbnail) {
                 ew_ResizeBinary($objBinary->Value, $iThumbnailWidth, $iThumbnailHeight);
             }
             $data = $objBinary->Value;
             if (strpos(ew_ServerVar("HTTP_USER_AGENT"), "MSIE") === FALSE) {
                 header("Content-type: " . ew_ContentType(substr($data, 0, 11), $this->Recordset->fields('rider_pic')));
             }
             if (trim(strval($this->Recordset->fields('rider_pic'))) != "") {
                 header("Content-Disposition: attachment; filename=\"" . $this->Recordset->fields('rider_pic') . "\"");
             }
             if (substr($data, 0, 2) == "PK" && strpos($data, "[Content_Types].xml") > 0 && strpos($data, "_rels") > 0 && strpos($data, "docProps") > 0) {
                 // Fix Office 2007 documents
                 if (substr($data, -4) != "") {
                     $data .= "";
                 }
             }
             echo $data;
         }
         $this->Recordset->Close();
     }
 }
开发者ID:ahmarmahmood,项目名称:tabedaar,代码行数:66,代码来源:rider_rider_pic_bv.php


示例5: ew_CurrentUrl

function ew_CurrentUrl()
{
    $s = ew_ScriptName();
    $q = ew_ServerVar("QUERY_STRING");
    if ($q != "") {
        $s .= "?" . $q;
    }
    return $s;
}
开发者ID:NoSympathy,项目名称:Dashboard,代码行数:9,代码来源:ewshared12.php


示例6: Page_Main

 function Page_Main()
 {
     global $conn, $exam_data;
     // Get key
     if (@$_GET["ExamDataNo"] != "") {
         $exam_data->ExamDataNo->setQueryStringValue($_GET["ExamDataNo"]);
     } else {
         $this->Page_Terminate();
         // Exit
         exit;
     }
     $objBinary = new cUpload('exam_data', 'x_Soap');
     // Show thumbnail
     $bShowThumbnail = @$_GET["showthumbnail"] == "1";
     if (@$_GET["thumbnailwidth"] == "" && @$_GET["thumbnailheight"] == "") {
         $iThumbnailWidth = EW_THUMBNAIL_DEFAULT_WIDTH;
         // Set default width
         $iThumbnailHeight = EW_THUMBNAIL_DEFAULT_HEIGHT;
         // Set default height
     } else {
         if (@$_GET["thumbnailwidth"] != "") {
             $iThumbnailWidth = $_GET["thumbnailwidth"];
             if (!is_numeric($iThumbnailWidth) || $iThumbnailWidth < 0) {
                 $iThumbnailWidth = 0;
             }
         }
         if (@$_GET["thumbnailheight"] != "") {
             $iThumbnailHeight = $_GET["thumbnailheight"];
             if (!is_numeric($iThumbnailHeight) || $iThumbnailHeight < 0) {
                 $iThumbnailHeight = 0;
             }
         }
     }
     if (@$_GET["quality"] != "") {
         $quality = $_GET["quality"];
         if (!is_numeric($quality)) {
             $quality = 75;
         }
         // Set Default
     } else {
         $quality = 75;
     }
     $sFilter = $exam_data->KeyFilter();
     // Set up filter (SQL WHERE clause) and get return SQL
     // SQL constructor in exam_data class, exam_datainfo.php
     $exam_data->CurrentFilter = $sFilter;
     $sSql = $exam_data->SQL();
     if ($rs = $conn->Execute($sSql)) {
         if (!$rs->EOF) {
             if (strpos(ew_ServerVar("HTTP_USER_AGENT"), "MSIE") === FALSE) {
                 header("Content-type: images");
             }
             $objBinary->Value = $rs->fields('Soap');
             if ($bShowThumbnail) {
                 ew_ResizeBinary($objBinary->Value, $iThumbnailWidth, $iThumbnailHeight, $quality);
             }
             $data = $objBinary->Value;
             if (substr($data, 0, 2) == "PK" && strpos($data, "[Content_Types].xml") > 0 && strpos($data, "_rels") > 0 && strpos($data, "docProps") > 0) {
                 // Fix Office 2007 documents
                 if (substr($data, -4) != "") {
                     $data .= "";
                 }
             }
             echo $data;
         }
         $rs->Close();
     }
 }
开发者ID:airfox7412,项目名称:ps01,代码行数:68,代码来源:exam_data_soap__bv.php


示例7: ew_UserAgent

function ew_UserAgent()
{
    $ua = ew_ServerVar("HTTP_USER_AGENT");
    $os = "";
    $agent = "";
    $mobile = "";
    $version = 0;
    // Detect OS
    if (preg_match("/windows|win32/i", $ua)) {
        $os = "windows";
    } elseif (preg_match("/macintosh/i", $ua)) {
        $os = "macintosh";
    } elseif (preg_match("/linux/i", $ua)) {
        $os = "linux";
    } elseif (preg_match("/rhino/i", $ua)) {
        $os = 'rhino';
    }
    // Modern KHTML browsers should qualify as Safari X-Grade
    $webkit = 0;
    if (preg_match("/KHTML/", $ua)) {
        $webkit = 1;
    }
    // Modern WebKit browsers are at least X-Grade
    if (preg_match("/AppleWebKit\\/([^\\s]*)/i", $ua, $m)) {
        $webkit = $m[1];
        // Mobile browser check
        if (preg_match("/ Mobile\\//i", $ua)) {
            $mobile = "Apple";
            // Check if iPhone or iPod Touch
            if (preg_match("/OS ([^\\s]*)/i", $ua, $m)) {
                $os = "iOS";
                $version = str_replace("_", ".", $m[1]);
                // Get iOS version
            }
            if (preg_match("/iPad/i", $ua, $m)) {
                $agent = "iPad";
            } elseif (preg_match("/iPod/i", $ua, $m)) {
                $agent = "iPod";
            } elseif (preg_match("/iPhone/i", $ua, $m)) {
                $agent = "iPhone";
            }
        } else {
            if (preg_match("/NokiaN[^\\/]*\\//i", $ua, $m)) {
                // Nokia N-series, ex: NokiaN95
                $os = "nokia";
                $mobile = $m[0];
                $agent = $mobile;
            }
            if (preg_match("/webOS/i", $ua, $m)) {
                $os = "WebOS";
                $mobile = $os;
                $agent = $mobile;
                if (preg_match("/webOS\\/([^\\s]*);/i", $ua, $m)) {
                    $agent = substr($m[0], 0, -1);
                    $version = $m[1];
                    // WebOS
                }
            }
            if (preg_match("/ Android/i", $ua, $m)) {
                $mobile = "Android";
                if (preg_match("/Android ([^\\s]*);/i", $ua, $m)) {
                    $agent = substr($m[0], 0, -1);
                    $version = $m[1];
                    // Android
                }
            }
            if (preg_match("/BlackBerry ([^\\s]*);/i", $ua, $m)) {
                $os = "BlackBerry";
                $mobile = $os;
                $agent = substr($m[0], 0, -1);
                $version = $m[1];
            }
            if (preg_match("/PlayBook/i", $ua)) {
                $os = "BackBerry";
                $mobile = $os;
                $agent = "PlayBook";
                if (preg_match("/ RIM Tablet OS ([^\\s]*);/i", $ua, $m)) {
                    $os = "RIM Tablet OS";
                    $version = $m[1];
                }
            }
        }
        if (preg_match("/Chrome\\/([^\\s]*)/i", $ua, $m)) {
            $agent = "Chrome";
            $version = $m[1];
            // Chrome
        } elseif ($mobile == "" && preg_match("/Safari\\//", $ua) && preg_match("/Version\\/([0-9\\.]+)/", $ua, $m)) {
            $agent = "Safari";
            $version = $m[1];
            // Safari
        } elseif (preg_match("/AdobeAIR\\/([^\\s]*)/i", $ua, $m)) {
            $agent = "AdobeAIR";
            $version = $m[0];
            // Adobe AIR 1.0 or better
        }
    }
    if ($webkit == 0) {
        // Not webkit
        if (preg_match("/Opera[\\s\\/]([^\\s]*)/i", $ua, $m)) {
            $agent = "Opera";
//.........这里部分代码省略.........
开发者ID:scintes,项目名称:sistemas,代码行数:101,代码来源:ewshared10.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP ew_SessionTimeoutTime函数代码示例发布时间:2022-05-15
下一篇:
PHP ew_SearchString函数代码示例发布时间: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