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


PHP Net_URL::getURL方法代码示例

本文整理汇总了PHP中Net_URL::getURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Net_URL::getURL方法的具体用法?PHP Net_URL::getURL怎么用?PHP Net_URL::getURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Net_URL的用法示例。


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

示例1: page_a

function page_a($url, $page, $text)
{
    $url_obj = new Net_URL($url);
    $url_obj->addQueryString('page', $page);
    $newurl = $url_obj->getURL();
    return "<a href='{$newurl}'>{$text}</a>";
}
开发者ID:nsahoo,项目名称:cmssw-1,代码行数:7,代码来源:pager_functions.php

示例2: analyze

 function analyze()
 {
     /* Find out the fully-qualified URL of test_feed.html */
     $target = new Net_URL('test_feed.html');
     $url = $target->getURL();
     /* Static values */
     $this->channel = new HTMLToFeed_Channel();
     $this->channel->title = 'Sample RSS feed';
     $this->channel->link = $url;
     $this->channel->description = 'This is a sample RSS feed created from a bogus HTML.';
     $this->channel->language = 'ja';
     try {
         $xml = $this->getXmlObject($url);
     } catch (Exception $e) {
         exit($e->getMessage());
     }
     /* Retrieve and parse LI elements */
     if ($li_elements = $xml->body->ul->li) {
         $this->convertPath($li_elements, array('a' => 'href'));
         foreach ($li_elements as $li) {
             $item = new HTMLToFeed_Item();
             $item->title = (string) $li->a;
             $item->link = $item->guid = (string) $li->a['href'];
             if (preg_match('|(\\d{4})/(\\d{1,2})/(\\d{1,2})|s', $item->title, $matches)) {
                 $item->pubDate = strtotime("{$matches['1']}-{$matches['2']}-{$matches['3']}");
             }
             $this->channel->items[] = $item;
         }
     }
     $this->sortMultiArray($this->channel->items, 'pubDate');
 }
开发者ID:diggin-sandbox,项目名称:mirror-htmlscraping-20090114,代码行数:31,代码来源:test_feed.php

示例3: getInstallerPath

 /**
  * インストーラーの URL を返す
  *
  * @return string インストーラーの URL
  */
 public static function getInstallerPath()
 {
     $netUrl = new Net_URL();
     $installer = 'install/' . DIR_INDEX_PATH;
     // XXX メソッド名は add で始まるが、実際には置換を行う
     $netUrl->addRawQueryString('');
     $current_url = $netUrl->getURL();
     $current_url = dirname($current_url) . '/';
     // XXX 先頭の / を含まない。
     $urlpath = substr($_SERVER['SCRIPT_FILENAME'], strlen(HTML_REALDIR));
     // / を 0、/foo/ を 1 としたディレクトリー階層数
     $dir_level = substr_count($urlpath, '/');
     $installer_url .= str_repeat('../', $dir_level) . $installer;
     return $installer_url;
 }
开发者ID:casan,项目名称:eccube-2_13,代码行数:20,代码来源:SC_Utils.php

示例4: setReturnTo

 function setReturnTo($key, $mode)
 {
     if (SC_Utils_Ex::isAppInnerUrl($_SERVER["HTTP_REFERER"])) {
         $netUrl = new Net_URL($_SERVER["HTTP_REFERER"]);
         $dir = basename(dirname($netUrl->path));
         $file = basename($netUrl->path);
         if (preg_match("{.*(confirm|complete).php}", $file)) {
             GC_Utils_Ex::gfPrintLog($file);
             return;
         }
         switch ($dir) {
             case "au":
             case "docomo":
             case "softbank":
                 break;
             default:
                 $_SESSION[$key] = $netUrl->getURL();
                 break;
         }
     }
 }
开发者ID:alice-asahina,项目名称:kisekae_touch,代码行数:21,代码来源:LC_Page_Au_Dummy.php

示例5: lfGetNews

 /**
  * 新着情報を取得する.
  *
  * @return array $arrNewsList 新着情報の配列を返す
  */
 function lfGetNews(&$objQuery)
 {
     if (DB_TYPE != 'sqlsrv') {
         return parent::lfGetNews($objQuery);
     } else {
         $objQuery->setOrder('rank DESC ');
         $arrNewsList = $objQuery->select("* ,convert(varchar(4), YEAR(news_date)) + '-' + convert(varchar(2), MONTH(news_date)) + '-' + convert(varchar(10), DAY(news_date)) as news_date_disp", 'dtb_news', 'del_flg = 0');
         // モバイルサイトのセッション保持 (#797)
         if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
             foreach (array_keys($arrNewsList) as $key) {
                 $arrRow =& $arrNewsList[$key];
                 if (SC_Utils_Ex::isAppInnerUrl($arrRow['news_url'])) {
                     $netUrl = new Net_URL($arrRow['news_url']);
                     $netUrl->addQueryString(session_name(), session_id());
                     $arrRow['news_url'] = $netUrl->getURL();
                 }
             }
         }
         return $arrNewsList;
     }
 }
开发者ID:nanasess,项目名称:eccube-WindowsAzureBlob-plugin,代码行数:26,代码来源:LC_Page_FrontParts_Bloc_News_Ex.php

示例6: reload

 /**
  * ページをリロードする.
  *
  * 引数 $queryString に, $_SERVER['QUERY_STRING'] の値を使用してはならない.
  * この関数は, 内部で LC_Page::sendRedirect() を使用するため,
  * $_SERVER['QUERY_STRING'] の値は自動的に付与される.
  *
  * @param array $queryString QueryString の配列
  * @param bool $removeQueryString 付与されていた QueryString を削除する場合 true
  * @return void
  * @see Net_URL
  */
 function reload($queryString = array(), $removeQueryString = false)
 {
     // 現在の URL を取得
     $netURL = new Net_URL();
     if ($removeQueryString) {
         $netURL->querystring = array();
         $_SERVER['QUERY_STRING'] = '';
     }
     // QueryString を付与
     if (!empty($queryString)) {
         foreach ($queryString as $key => $val) {
             $netURL->addQueryString($key, $val);
         }
     }
     $this->sendRedirect($netURL->getURL());
 }
开发者ID:khrisna,项目名称:eccubedrm,代码行数:28,代码来源:LC_Page.php

示例7: doDefault

 /**
  *
  * @param  SC_Product_Ex $objProduct
  * @param SC_FormParam_Ex $objFormParam
  * @return void
  */
 public function doDefault(&$objProduct, &$objFormParam)
 {
     //商品一覧の表示処理
     $strnavi = $this->objNavi->strnavi;
     // 表示文字列
     $this->tpl_strnavi = empty($strnavi) ? '&nbsp;' : $strnavi;
     // 規格1クラス名
     $this->tpl_class_name1 = $objProduct->className1;
     // 規格2クラス名
     $this->tpl_class_name2 = $objProduct->className2;
     // 規格1
     $this->arrClassCat1 = $objProduct->classCats1;
     // 規格1が設定されている
     $this->tpl_classcat_find1 = $objProduct->classCat1_find;
     // 規格2が設定されている
     $this->tpl_classcat_find2 = $objProduct->classCat2_find;
     $this->tpl_stock_find = $objProduct->stock_find;
     $this->tpl_product_class_id = $objProduct->product_class_id;
     $this->tpl_product_type = $objProduct->product_type;
     // 商品ステータスを取得
     $this->productStatus = $this->arrProducts['productStatus'];
     unset($this->arrProducts['productStatus']);
     $this->tpl_javascript .= 'eccube.productsClassCategories = ' . SC_Utils_Ex::jsonEncode($objProduct->classCategories) . ';';
     if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_PC) {
         //onloadスクリプトを設定. 在庫ありの商品のみ出力する
         foreach ($this->arrProducts as $arrProduct) {
             if ($arrProduct['stock_unlimited_max'] || $arrProduct['stock_max'] > 0) {
                 $js_fnOnLoad .= "fnSetClassCategories(document.product_form{$arrProduct['product_id']});";
             }
         }
     }
     //カート処理
     $target_product_id = intval($this->arrForm['product_id']);
     if ($target_product_id > 0) {
         // 商品IDの正当性チェック
         if (!SC_Utils_Ex::sfIsInt($this->arrForm['product_id']) || !SC_Helper_DB_Ex::sfIsRecord('dtb_products', 'product_id', $this->arrForm['product_id'], 'del_flg = 0 AND status = 1')) {
             SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
         }
         // 入力内容のチェック
         $arrErr = $this->lfCheckError($objFormParam);
         if (empty($arrErr)) {
             $this->lfAddCart($this->arrForm);
             // 開いているカテゴリーツリーを維持するためのパラメーター
             $arrQueryString = array('category_id' => $this->arrForm['category_id']);
             SC_Response_Ex::sendRedirect(CART_URL, $arrQueryString);
             SC_Response_Ex::actionExit();
         }
         $js_fnOnLoad .= $this->lfSetSelectedData($this->arrProducts, $this->arrForm, $arrErr, $target_product_id);
     } else {
         // カート「戻るボタン」用に保持
         $netURL = new Net_URL();
         //該当メソッドが無いため、$_SESSIONに直接セット
         $_SESSION['cart_referer_url'] = $netURL->getURL();
     }
     $this->tpl_javascript .= 'function fnOnLoad() {' . $js_fnOnLoad . '}';
     $this->tpl_onload .= 'fnOnLoad(); ';
 }
开发者ID:rateon,项目名称:twhk-ec,代码行数:63,代码来源:LC_Page_Products_List.php

示例8: lfGetNews

 /**
  * 新着情報を取得する.
  *
  * @return array $arrNewsList 新着情報の配列を返す
  */
 public function lfGetNews($dispNumber, $pageNo, SC_Helper_News_Ex $objNews)
 {
     $arrNewsList = $objNews->getList($dispNumber, $pageNo);
     // モバイルサイトのセッション保持 (#797)
     if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
         foreach ($arrNewsList as $key => $value) {
             $arrRow =& $arrNewsList[$key];
             if (SC_Utils_Ex::isAppInnerUrl($arrRow['news_url'])) {
                 $netUrl = new Net_URL($arrRow['news_url']);
                 $netUrl->addQueryString(session_name(), session_id());
                 $arrRow['news_url'] = $netUrl->getURL();
             }
         }
     }
     return $arrNewsList;
 }
开发者ID:rateon,项目名称:twhk-ec,代码行数:21,代码来源:LC_Page_FrontParts_Bloc_News.php

示例9: doCheckBuyAndDownloadOk

 function doCheckBuyAndDownloadOk($config, $re_download = false)
 {
     $objCustomer = new SC_Customer_Ex();
     $objQuery = SC_Query_Ex::getSingletonInstance();
     if (empty($_REQUEST["product_ktc_vid"])) {
         SC_Utils_Ex::sfDispSiteError(PAGE_ERROR);
     }
     $vid = $_REQUEST["product_ktc_vid"];
     $curl = $this->curl_init(KISEKAE_TOUCH_API02);
     $post = $this->getPost($config, array("contentid" => $this->arrProduct["product_code_min"], "vid" => $vid));
     $this->getDs($post, $config);
     curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
     GC_Utils_Ex::gfPrintLog(print_r($post, TRUE), DEBUG_LOG_REALFILE);
     $result = curl_exec($curl);
     $status = SC_XML::xpath($result, "//status/@value");
     switch ($status) {
         default:
             SC_Utils_Ex::sfDispSiteError(PAGE_ERROR);
             break;
         case "000":
         case "010":
             break;
     }
     if ($status == "000") {
         // FIXME 課金処理
         // API03
         $curl = $this->curl_init(KISEKAE_TOUCH_API03);
         if ($objCustomer->getValue("buy_to_nopoint") == "1") {
             $price = $this->arrProduct["price02_min"];
             $settlementtype = "998";
             $redownloaddate = date("Ymd");
         } elseif ($re_download) {
             $price = 0;
             $settlementtype = "900";
             $redownloaddate = date("Ymd");
         } else {
             $price = $this->arrProduct["price02_min"];
             $settlementtype = "001";
             $redownloaddate = date("Ymd", strtotime($this->downloadable_days2));
         }
         $contentid = $this->arrProduct["product_code_min"];
         $post = compact("contentid", "price", "redownloaddate", "vid", "settlementtype");
         $post = $this->getPost($config, $post);
         $this->getDs($post, $config);
         curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
         GC_Utils_Ex::gfPrintLog(print_r($post, TRUE), DEBUG_LOG_REALFILE);
         $result = curl_exec($curl);
         $authentication_id = SC_XML::xpath($result, "//authentication/@id");
         $objFormParam = new SC_FormParam();
         $this->setOrderParam($objFormParam, $vid, $authentication_id);
         $objFormParam->convParam();
         $message = '';
         $arrValBef = array();
         $objPurchase = new SC_Helper_Purchase_Ex();
         $objPurchase->saveShippingTemp(array());
         $order_id = $this->doRegister("", $objPurchase, $objFormParam, $message, $arrValBef);
         $customer_id = $objCustomer->getValue("customer_id");
         $this->addPointHistory($order_id, $customer_id, $objFormParam, $objQuery);
     } else {
         $authentication_id = SC_XML::xpath($result, "//authentication/@id");
     }
     $netUrl = new Net_URL(KISEKAE_TOUCH_CST02);
     $netUrl->addQueryString("aid", $authentication_id);
     $netUrl->addQueryString("cpid", $post["cpid"]);
     $netUrl->addQueryString("siteid", $post["siteid"]);
     $netUrl->addQueryString("contentid", $post["contentid"]);
     $netUrl->addQueryString("ts", $post["ts"]);
     $post2 = $netUrl->querystring;
     $this->getDs($post2, $config);
     $netUrl->addRawQueryString(http_build_query($post2));
     header("Location: " . $netUrl->getURL());
 }
开发者ID:alice-asahina,项目名称:kisekae_touch,代码行数:72,代码来源:LC_Page_Products_Detail_Ex.php

示例10: doCheckBuyAndDownload

 function doCheckBuyAndDownload($config)
 {
     $objFormParam = new SC_FormParam();
     $this->lfInitParam($objFormParam);
     $objFormParam->setParam($_REQUEST);
     $objCustomer = new SC_Customer_Ex();
     $objQuery = SC_Query::getSingletonInstance();
     $detect = new Mobile_Detect();
     $version = $detect->version("iOS", Mobile_Detect::VERSION_TYPE_FLOAT);
     $contentid = $this->arrProduct["product_code_min"];
     $curl = $this->curl_init(KISEKAE_TOUCH_IPHONE_API01);
     $post = $this->getPost($config, array("contentid" => $contentid, "device" => $objFormParam->getValue("device_name", "iPhone6"), "version" => floor($version), "apiversion" => null, "operator" => "au", "lang" => "ja"));
     $this->getDs($post, $config);
     curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
     GC_Utils_Ex::gfPrintLog(print_r($post, TRUE), DEBUG_LOG_REALFILE);
     $result = curl_exec($curl);
     $status = SC_XML::xpath($result, "//status/@value");
     $vid = SC_XML::xpath($result, "//validation/@id");
     switch ($status) {
         default:
             SC_Utils_Ex::sfDispSiteError(PAGE_ERROR);
         case "000":
             GC_Utils_Ex::gfDebugLog($result);
             $_COOKIE["product_ktc_vid"] = $vid;
             break;
     }
     // API2
     $openid = $objCustomer->getValue("au_open_id");
     $curl = $this->curl_init(KISEKAE_TOUCH_IPHONE_API02);
     $post = $this->getPost($config, array("contentid" => $contentid, "userid" => $openid, "vid" => $vid));
     $this->getDs($post, $config);
     curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
     GC_Utils_Ex::gfPrintLog(print_r($post, TRUE), DEBUG_LOG_REALFILE);
     $result = curl_exec($curl);
     $status = SC_XML::xpath($result, "//status/@value");
     switch ($status) {
         default:
             SC_Utils_Ex::sfDispSiteError(PAGE_ERROR);
             break;
         case "000":
         case "010":
             // TEST
             // /ios/products/detail.php?mode=check_buy_and_download&product_id=13&classcategory_id1=0&classcategory_id2=0&quantity=1&admin=&favorite_product_id=&product_class_id=&device_name=iPhone6Plus&device_height=736&device_width=414&device_rate=3&device_lang=ja&ignore_redownload=1
             if ($_GET["ignore_redownload"] == "1") {
                 $status = "000";
             }
             break;
     }
     if ($status == "000") {
         // FIXME 課金処理
         // API03
         $curl = $this->curl_init(KISEKAE_TOUCH_IPHONE_API03);
         if ($objCustomer->getValue("buy_to_nopoint") == "1") {
             $price = $this->arrProduct["price02_min"];
             $settlementtype = "998";
             $redownloaddate = date("Ymd");
         } else {
             $price = $this->arrProduct["price02_min"];
             $settlementtype = "001";
             $redownloaddate = date("Ymd", strtotime($this->downloadable_days2));
         }
         $post = $this->getPost($config, array("contentid" => $contentid, "price" => $price, "redownloaddate" => $redownloaddate, "userid" => $openid, "vid" => $vid, "settlementtype" => $settlementtype));
         $this->getDs($post, $config);
         curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
         GC_Utils_Ex::gfPrintLog(print_r($post, TRUE), DEBUG_LOG_REALFILE);
         $result = curl_exec($curl);
         $authentication_id = SC_XML::xpath($result, "//authentication/@id");
         $objFormParam = new SC_FormParam();
         $this->setOrderParam($objFormParam, $vid, $authentication_id);
         $objFormParam->convParam();
         $message = '';
         $arrValBef = array();
         $objPurchase = new SC_Helper_Purchase_Ex();
         $objPurchase->saveShippingTemp(array());
         $order_id = $this->doRegister("", $objPurchase, $objFormParam, $message, $arrValBef);
         $customer_id = $objCustomer->getValue("customer_id");
         $this->addPointHistory($order_id, $customer_id, $objFormParam, $objQuery);
     } else {
         $authentication_id = SC_XML::xpath($result, "//authentication/@id");
     }
     $netUrl = new Net_URL(KISEKAE_TOUCH_IPHONE_CST02);
     $netUrl->addQueryString("aid", $authentication_id);
     $netUrl->addQueryString("cpid", $config["cpid"]);
     $netUrl->addQueryString("siteid", $config["siteid"]);
     $netUrl->addQueryString("contentid", $contentid);
     $netUrl->addQueryString("ts", date("YmdHis"));
     $post2 = $netUrl->querystring;
     $this->getDs($post2, $config);
     $netUrl->addRawQueryString(http_build_query($post2));
     GC_Utils_Ex::gfPrintLog(print_r($post2, TRUE), DEBUG_LOG_REALFILE);
     header("Location: " . $netUrl->getURL());
 }
开发者ID:alice-asahina,项目名称:kisekae_touch,代码行数:92,代码来源:LC_Page_iOS_Products_Detail.php

示例11:

	}
	if ($ustawieniaGaleriiZdjec->obslugaPolaGaleriaZdjecNowa) {
		echo "<th>Nowa</th>";
	}
	if ($ustawieniaGaleriiZdjec->obslugaPolaGaleriaZdjecPrawieNowa) {
		echo "<th>Prawie nowa</th>";
	}
	echo "<th>Akcja</th>";
	echo "<tr>\n";

	$edytujUrl = new Net_URL($_SERVER['REQUEST_URI'], false);
	$usunUrl = new Net_URL($_SERVER['REQUEST_URI'], false);
	$dodajUrl = new Net_URL($_SERVER['REQUEST_URI'], false);

	$dodajUrl->addQueryString("dodaj", "1");
	$dodajLink = $dodajUrl->getURL();

	foreach ($galerie as $galeriaZdjec) {
		$edytujUrl->addQueryString("edytuj", $galeriaZdjec->katalog);
		$edytujLink = $edytujUrl->getURL();

		$usunUrl->addQueryString("usun", $galeriaZdjec->katalog);
		$usunLink = $usunUrl->getURL();

		echo "<tr>";
		echo "<td>" . $galeriaZdjec->katalog . "</td>";
		echo "<td>" . $galeriaZdjec->data . "</td>";
		echo "<td>" . $galeriaZdjec->tytulGalerii . "</td>";
		if ($ustawieniaGaleriiZdjec->obslugaPolaGaleriaZdjecOpis) {
			echo "<td>" . $galeriaZdjec->opisGalerii . "</td>";
		}
开发者ID:BGCX261,项目名称:zhr-zielonagora-svn-to-git,代码行数:31,代码来源:zarzadzanieGaleriamiZdjec.php

示例12: __construct

 /**
  * Instantiate a new MP3_Playlist object.
  *
  * Expects a reading directory, the output directory where the playlist will
  * be saved and the directory or URL to be used within the playlist.
  *
  * @param   string $dir     The directory to scan
  * @param   string $outdir  The directory where to save the playlist file
  * @param   string $baseurl The base url to append on the playlist file
  * @param   bool   $debug   (optional) Whether print debug message or not, default FALSE
  *
  * @return  TRUE|PEAR_Error
  * @see     MP3_Playlist::fixPath()
  */
 public function __construct($dir, $outdir, $baseurl, $debug = false)
 {
     // Taking the values from the constructor and assigning it to the
     // private variables
     $this->parseDirectory = self::fixPath($dir);
     $this->outputDirectory = self::fixPath($outdir);
     // Fix the URL if needed.
     if (substr($baseurl, -1) != '/') {
         $baseurl .= '/';
     }
     $url = new Net_URL($baseurl);
     if (!empty($url->path)) {
         $dirs = explode('/', $url->path);
         foreach ($dirs as $key => $value) {
             if (!empty($value)) {
                 $dirs[$key] = rawurlencode($value);
             }
         }
         $url->path = Net_URL::resolvePath(implode('/', $dirs));
     }
     $this->baseUrl = $url->getURL();
     $this->list = array();
     // Instantiate the new MP3_If object
     $this->mp3 = new MP3_Id();
     $this->debug = $debug;
     $this->parse();
 }
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:41,代码来源:Playlist.php

示例13: wyswietlOstatniKomentarz

	/**
	 *
	 * @static
	 */
	function wyswietlOstatniKomentarz() {
		$ostatniKomentarz = ZarzadcaKomentarzy::pobierzOstatniKomentarz();
		$galeriaZdjec = ZarzadcaGaleriiZdjec::pobierzGalerie($ostatniKomentarz->katalog);

		$tytulGalerii = "";
		if ($galeriaZdjec != null) {
			$tytulGalerii = $galeriaZdjec->tytulGalerii;
		}
		$podpis = $ostatniKomentarz->podpis;
		$tresc = $ostatniKomentarz->tresc;

		$ustawieniaGaleriiZdjec = new UstawieniaGaleriiZdjec();
		$url = new Net_URL($ustawieniaGaleriiZdjec->linkDoGaleriiZdjec, false);
		$url->addQueryString("katalog", $ostatniKomentarz->katalog);
		$url->anchor = $ostatniKomentarz->nazwaPlikuZdjecia;

		if ($tresc != null && $tresc != "") {
			echo "<span class=\"ostatniKomentarz\"><a href=\"" . $url->getURL() . "\" title=\"$tytulGalerii\"><b>[$podpis]</b> $tresc</a></span>";
		}
	}
开发者ID:BGCX261,项目名称:zhr-zielonagora-svn-to-git,代码行数:24,代码来源:PrezentacjaGaleriiZdjec.class.php

示例14: reloadSSL

 /**
  *
  * @static
  *
  */
 public function reloadSSL($arrQueryString = array(), $removeQueryString = false)
 {
     // 現在の URL を取得
     $netUrl = new Net_URL(GC_Utils_Ex::getUrl());
     if (!$removeQueryString) {
         $arrQueryString = array_merge($netUrl->querystring, $arrQueryString);
     }
     $netUrl->querystring = array();
     SC_Response_Ex::sendRedirect($netUrl->getURL(), $arrQueryString, false, true);
 }
开发者ID:alice-asahina,项目名称:kisekae_touch,代码行数:15,代码来源:SC_Response_Ex.php

示例15: action

 /**
  * Page のAction.
  *
  * @return void
  */
 function action()
 {
     $objQuery =& SC_Query_Ex::getSingletonInstance();
     $objProduct = new SC_Product_Ex();
     $this->arrForm = $_REQUEST;
     //時間が無いのでコレで勘弁してください。 tao_s
     //modeの取得
     $this->mode = $this->getMode();
     //表示条件の取得
     $this->arrSearchData = array('category_id' => $this->lfGetCategoryId(intval($this->arrForm['category_id'])), 'maker_id' => intval($this->arrForm['maker_id']), 'name' => $this->arrForm['name']);
     $this->orderby = $this->arrForm['orderby'];
     //ページング設定
     $this->tpl_pageno = $this->arrForm['pageno'];
     $this->disp_number = $this->lfGetDisplayNum($this->arrForm['disp_number']);
     // 画面に表示するサブタイトルの設定
     $this->tpl_subtitle = $this->lfGetPageTitle($this->mode, $this->arrSearchData['category_id']);
     // 画面に表示する検索条件を設定
     $this->arrSearch = $this->lfGetSearchConditionDisp($this->arrSearchData);
     // 商品一覧データの取得
     $arrSearchCondition = $this->lfGetSearchCondition($this->arrSearchData);
     $this->tpl_linemax = $this->lfGetProductAllNum($arrSearchCondition);
     $urlParam = "category_id={$this->arrSearchData['category_id']}&pageno=#page#";
     $this->objNavi = new SC_PageNavi_Ex($this->tpl_pageno, $this->tpl_linemax, $this->disp_number, 'fnNaviPage', NAVI_PMAX, $urlParam, SC_Display_Ex::detectDevice() !== DEVICE_TYPE_MOBILE);
     $this->arrProducts = $this->lfGetProductsList($arrSearchCondition, $this->disp_number, $this->objNavi->start_row, $this->tpl_linemax, $objProduct);
     switch ($this->getMode()) {
         case "json":
             $this->arrProducts = $this->setStatusDataTo($this->arrProducts, $this->arrSTATUS, $this->arrSTATUS_IMAGE);
             $this->arrProducts = $objProduct->setPriceTaxTo($this->arrProducts);
             // 一覧メイン画像の指定が無い商品のための処理
             foreach ($this->arrProducts as $key => $val) {
                 $this->arrProducts[$key]['main_list_image'] = SC_Utils_Ex::sfNoImageMainList($val['main_list_image']);
             }
             echo SC_Utils_Ex::jsonEncode($this->arrProducts);
             exit;
             break;
         default:
             //商品一覧の表示処理
             $strnavi = $this->objNavi->strnavi;
             // 表示文字列
             $this->tpl_strnavi = empty($strnavi) ? "&nbsp;" : $strnavi;
             // 規格1クラス名
             $this->tpl_class_name1 = $objProduct->className1;
             // 規格2クラス名
             $this->tpl_class_name2 = $objProduct->className2;
             // 規格1
             $this->arrClassCat1 = $objProduct->classCats1;
             // 規格1が設定されている
             $this->tpl_classcat_find1 = $objProduct->classCat1_find;
             // 規格2が設定されている
             $this->tpl_classcat_find2 = $objProduct->classCat2_find;
             $this->tpl_stock_find = $objProduct->stock_find;
             $this->tpl_product_class_id = $objProduct->product_class_id;
             $this->tpl_product_type = $objProduct->product_type;
             // 商品ステータスを取得
             $this->productStatus = $this->arrProducts['productStatus'];
             unset($this->arrProducts['productStatus']);
             $this->tpl_javascript .= 'var productsClassCategories = ' . SC_Utils_Ex::jsonEncode($objProduct->classCategories) . ';';
             //onloadスクリプトを設定. 在庫ありの商品のみ出力する
             foreach ($this->arrProducts as $arrProduct) {
                 if ($arrProduct['stock_unlimited_max'] || $arrProduct['stock_max'] > 0) {
                     $js_fnOnLoad .= "fnSetClassCategories(document.product_form{$arrProduct['product_id']});";
                 }
             }
             //カート処理
             $target_product_id = intval($this->arrForm['product_id']);
             if ($target_product_id > 0) {
                 // 商品IDの正当性チェック
                 if (!SC_Utils_Ex::sfIsInt($this->arrForm['product_id']) || !SC_Helper_DB_Ex::sfIsRecord("dtb_products", "product_id", $this->arrForm['product_id'], "del_flg = 0 AND status = 1")) {
                     SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
                 }
                 // 入力内容のチェック
                 $arrErr = $this->lfCheckError($target_product_id, $this->arrForm, $this->tpl_classcat_find1, $this->tpl_classcat_find2);
                 if (empty($arrErr)) {
                     $this->lfAddCart($this->arrForm, $_SERVER['HTTP_REFERER']);
                     SC_Response_Ex::sendRedirect(CART_URLPATH);
                     exit;
                 }
                 $js_fnOnLoad .= $this->lfSetSelectedData($this->arrProducts, $this->arrForm, $arrErr, $target_product_id);
             } else {
                 // カート「戻るボタン」用に保持
                 $netURL = new Net_URL();
                 //該当メソッドが無いため、$_SESSIONに直接セット
                 $_SESSION['cart_referer_url'] = $netURL->getURL();
             }
             $this->tpl_javascript .= 'function fnOnLoad(){' . $js_fnOnLoad . '}';
             $this->tpl_onload .= 'fnOnLoad(); ';
             break;
     }
     $this->tpl_rnd = SC_Utils_Ex::sfGetRandomString(3);
 }
开发者ID:nanasess,项目名称:ec-azure,代码行数:95,代码来源:LC_Page_Products_List.php


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