Subversion Repositories php-qbpwcf

Rev

Rev 207 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 207 Rev 226
Line 1... Line 1...
1
<?php
1
<?php
2
 
2
 
3
/*
3
/*
4
 
4
 
5
	QBPWCF, Quick Build PHP website Component base on Fedora Linux.
5
	QBPWCF, Quick Build PHP website Component base on Fedora Linux.
6
    Copyright (C) 2014~2025 Min-Jhin,Chen
6
    Copyright (C) 2014~2025 MIN ZHI, CHEN
7
 
7
 
8
    This file is part of QBPWCF.
8
    This file is part of QBPWCF.
9
 
9
 
10
    QBPWCF is free software: you can redistribute it and/or modify
10
    QBPWCF is free software: you can redistribute it and/or modify
11
    it under the terms of the GNU General Public License as published by
11
    it under the terms of the GNU General Public License as published by
Line 1016... Line 1016...
1016
		#初始化 data 屬性的內容
1016
		#初始化 data 屬性的內容
1017
		$dataAttr="";
1017
		$dataAttr="";
1018
 
1018
 
1019
		#如果有設置 $conf["data"] 參數
1019
		#如果有設置 $conf["data"] 參數
1020
		if(isset($conf["data"])){
1020
		if(isset($conf["data"])){
1021
		
1021
 
1022
			#依據每個元素
1022
			#依據每個元素
1023
			foreach($conf["data"] as $name => $value){
1023
			foreach($conf["data"] as $name => $value){
1024
 
1024
 
1025
				#串接 data 屬性
1025
				#串接 data 屬性
1026
				$dataAttr=$dataAttr."data-".$name."=\"".$value."\" ";
1026
				$dataAttr=$dataAttr."data-".$name."=\"".$value."\" ";
1027
 
1027
 
1028
				}#foreach end
1028
				}#foreach end
1029
				
1029
 
1030
			}#foreach end
1030
			}#foreach end
1031
 
1031
 
1032
		#初始化 id
1032
		#初始化 id
1033
		$id="";
1033
		$id="";
1034
 
1034
 
Line 1078... Line 1078...
1078
 
1078
 
1079
				#取得style字串
1079
				#取得style字串
1080
				$styleStr=$styleStr["content"];
1080
				$styleStr=$styleStr["content"];
1081
 
1081
 
1082
				}#if end
1082
				}#if end
1083
			
1083
 
1084
			}#if end
1084
			}#if end
1085
 
1085
 
1086
		#設置div起始標籤與class設定
1086
		#設置div起始標籤與class設定
1087
		$result["content"]="<span ".$styleStr." ".$conf["class"]." ".$conf["title"]." ".$dataAttr." ".$id.">";
1087
		$result["content"]="<span ".$styleStr." ".$conf["class"]." ".$conf["title"]." ".$dataAttr." ".$id.">";
1088
 
1088
 
Line 1334... Line 1334...
1334
 
1334
 
1335
			}#if end
1335
			}#if end
1336
 
1336
 
1337
		#反之
1337
		#反之
1338
		else{
1338
		else{
1339
			
1339
 
1340
			#如果 $conf["textAlignCenter"] 為 "true"
1340
			#如果 $conf["textAlignCenter"] 為 "true"
1341
			if($conf["textAlignCenter"]==="true"){
1341
			if($conf["textAlignCenter"]==="true"){
1342
 
1342
 
1343
				#新增置中的屬性
1343
				#新增置中的屬性
1344
				$conf["styleAttr"][]="text-align";
1344
				$conf["styleAttr"][]="text-align";
1345
 
1345
 
1346
				#新增置中的屬性值
1346
				#新增置中的屬性值
1347
				$conf["styleVal"][]="center";
1347
				$conf["styleVal"][]="center";
1348
 
1348
 
1349
				}#if end
1349
				}#if end
1350
			
1350
 
1351
			}#else end
1351
			}#else end
1352
 
1352
 
1353
		#如果有style樣式要設定
1353
		#如果有style樣式要設定
1354
		if(count($conf["styleAttr"])>0 && count($conf["styleVal"])>0){
1354
		if(count($conf["styleAttr"])>0 && count($conf["styleVal"])>0){
1355
 
1355
 
Line 4249... Line 4249...
4249
	$conf["width"]="";
4249
	$conf["width"]="";
4250
	#可省略參數:
4250
	#可省略參數:
4251
	#$conf["between"],字串,宣單項目之間要相隔多少距離,$conf["width"],單位爲px.
4251
	#$conf["between"],字串,宣單項目之間要相隔多少距離,$conf["width"],單位爲px.
4252
	#$conf["between"]="";
4252
	#$conf["between"]="";
4253
	#$conf["top"],字串,選單項目距離上部的距離,預設不指定,單位爲px.
4253
	#$conf["top"],字串,選單項目距離上部的距離,預設不指定,單位爲px.
4254
	#$conf["top"]=""; 
4254
	#$conf["top"]="";
4255
	#$conf["bgColor"],字串,選單的背景顏色,預設爲"#FFFFFF".
4255
	#$conf["bgColor"],字串,選單的背景顏色,預設爲"#FFFFFF".
4256
	#$conf["bgColor"]="";
4256
	#$conf["bgColor"]="";
4257
	#參考資料:
4257
	#參考資料:
4258
	#無.
4258
	#無.
4259
	#備註:
4259
	#備註:
4260
	#無.
4260
	#無.
4261
	*/
4261
	*/
4262
	public static function rwdMenu(&$conf){
4262
	public static function rwdMenu(&$conf){
4263
		
4263
 
4264
		#初始化要回傳的結果
4264
		#初始化要回傳的結果
4265
		$result=array();
4265
		$result=array();
4266
 
4266
 
4267
		#取得當前執行的函數名稱
4267
		#取得當前執行的函數名稱
4268
		$result["function"]=__FUNCTION__;
4268
		$result["function"]=__FUNCTION__;
Line 4372... Line 4372...
4372
 
4372
 
4373
			#回傳結果
4373
			#回傳結果
4374
			return $result;
4374
			return $result;
4375
 
4375
 
4376
			}#if end
4376
			}#if end
4377
		
4377
 
4378
		#初始化要回傳的語法
4378
		#初始化要回傳的語法
4379
		$result["content"]="";
4379
		$result["content"]="";
4380
		
4380
 
4381
		#寬度小於 $conf["width"] 要設置 inline 的 logo
4381
		#寬度小於 $conf["width"] 要設置 inline 的 logo
4382
		#函式說明:
4382
		#函式說明:
4383
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
4383
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
4384
		#回傳結果:
4384
		#回傳結果:
4385
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
4385
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
Line 4399... Line 4399...
4399
		$rwd=css::rwd($conf["css::rwd"]);
4399
		$rwd=css::rwd($conf["css::rwd"]);
4400
		unset($conf["css::rwd"]);
4400
		unset($conf["css::rwd"]);
4401
 
4401
 
4402
		#如果建立rwd區塊失敗
4402
		#如果建立rwd區塊失敗
4403
		if($rwd["status"]==="false"){
4403
		if($rwd["status"]==="false"){
4404
			
4404
 
4405
			#設置執行不正常
4405
			#設置執行不正常
4406
			$result["status"]="false";
4406
			$result["status"]="false";
4407
 
4407
 
4408
			#設置執行錯誤
4408
			#設置執行錯誤
4409
			$result["error"]=$rwd;
4409
			$result["error"]=$rwd;
4410
 
4410
 
4411
			#回傳結果
4411
			#回傳結果
4412
			return $result;
4412
			return $result;
4413
			
4413
 
4414
			}#if end
4414
			}#if end
4415
			
4415
 
4416
		#取得 css 語法
4416
		#取得 css 語法
4417
		$result["content"]=$result["content"].$rwd["content"];	
4417
		$result["content"]=$result["content"].$rwd["content"];
4418
 
4418
 
4419
		#寬度大於 $conf["width"]px logo 要 inline
4419
		#寬度大於 $conf["width"]px logo 要 inline
4420
		#函式說明:
4420
		#函式說明:
4421
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
4421
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
4422
		#回傳結果:
4422
		#回傳結果:
Line 4437... Line 4437...
4437
		$rwd=css::rwd($conf["css::rwd"]);
4437
		$rwd=css::rwd($conf["css::rwd"]);
4438
		unset($conf["css::rwd"]);
4438
		unset($conf["css::rwd"]);
4439
 
4439
 
4440
		#如果建立rwd區塊失敗
4440
		#如果建立rwd區塊失敗
4441
		if($rwd["status"]==="false"){
4441
		if($rwd["status"]==="false"){
4442
			
4442
 
4443
			#設置執行不正常
4443
			#設置執行不正常
4444
			$result["status"]="false";
4444
			$result["status"]="false";
4445
 
4445
 
4446
			#設置執行錯誤
4446
			#設置執行錯誤
4447
			$result["error"]=$rwd;
4447
			$result["error"]=$rwd;
4448
 
4448
 
4449
			#回傳結果
4449
			#回傳結果
4450
			return $result;
4450
			return $result;
4451
			
4451
 
4452
			}#if end
4452
			}#if end
4453
			
4453
 
4454
		#取得 css 語法
4454
		#取得 css 語法
4455
		$result["content"]=$result["content"].$rwd["content"];	
4455
		$result["content"]=$result["content"].$rwd["content"];
4456
			
4456
 
4457
		#寬度大於 $conf["width"] 要設置menu類別左邊位移.
4457
		#寬度大於 $conf["width"] 要設置menu類別左邊位移.
4458
		#涵式說明
4458
		#涵式說明
4459
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
4459
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
4460
		#回傳結果:
4460
		#回傳結果:
4461
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
4461
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
Line 4470... Line 4470...
4470
		$conf["css::rwd"]["target"]=array(".".$conf["otherEleClass"]);
4470
		$conf["css::rwd"]["target"]=array(".".$conf["otherEleClass"]);
4471
		#conf["styleAttr"],二維陣列字串,針對每個$conf["target"]要使用的css樣式屬性陣列.
4471
		#conf["styleAttr"],二維陣列字串,針對每個$conf["target"]要使用的css樣式屬性陣列.
4472
		$conf["css::rwd"]["styleAttr"]=array(array("display","position"));
4472
		$conf["css::rwd"]["styleAttr"]=array(array("display","position"));
4473
		#$conf["styleVal"],二維陣列字串,針對每個$conf["target"]要使用的css樣式數值陣列.
4473
		#$conf["styleVal"],二維陣列字串,針對每個$conf["target"]要使用的css樣式數值陣列.
4474
		$conf["css::rwd"]["styleVal"]=array(array("inline","relative"));
4474
		$conf["css::rwd"]["styleVal"]=array(array("inline","relative"));
4475
		
4475
 
4476
		#如果有設置 $conf["between"]
4476
		#如果有設置 $conf["between"]
4477
		if(isset($conf["between"])){
4477
		if(isset($conf["between"])){
4478
			
4478
 
4479
			#設置 margin-left 屬性
4479
			#設置 margin-left 屬性
4480
			$conf["css::rwd"]["styleAttr"][0][]="margin-left";
4480
			$conf["css::rwd"]["styleAttr"][0][]="margin-left";
4481
			
4481
 
4482
			#設置對應的數值
4482
			#設置對應的數值
4483
			$conf["css::rwd"]["styleVal"][0][]=$conf["between"];
4483
			$conf["css::rwd"]["styleVal"][0][]=$conf["between"];
4484
			
4484
 
4485
			}#if end
4485
			}#if end
4486
		
4486
 
4487
		#如果有設置 $conf["top"]
4487
		#如果有設置 $conf["top"]
4488
		if(isset($conf["top"])){
4488
		if(isset($conf["top"])){
4489
			
4489
 
4490
			#設置 top 屬性
4490
			#設置 top 屬性
4491
			$conf["css::rwd"]["styleAttr"][0][]="top";
4491
			$conf["css::rwd"]["styleAttr"][0][]="top";
4492
			
4492
 
4493
			#設置對應的數值
4493
			#設置對應的數值
4494
			$conf["css::rwd"]["styleVal"][0][]=$conf["top"];
4494
			$conf["css::rwd"]["styleVal"][0][]=$conf["top"];
4495
			
4495
 
4496
			}#if end
4496
			}#if end
4497
		
4497
 
4498
		$rwd=css::rwd($conf["css::rwd"]);
4498
		$rwd=css::rwd($conf["css::rwd"]);
4499
		unset($conf["css::rwd"]);
4499
		unset($conf["css::rwd"]);
4500
		
4500
 
4501
		#如果建立rwd區塊失敗
4501
		#如果建立rwd區塊失敗
4502
		if($rwd["status"]==="false"){
4502
		if($rwd["status"]==="false"){
4503
			
4503
 
4504
			#設置執行不正常
4504
			#設置執行不正常
4505
			$result["status"]="false";
4505
			$result["status"]="false";
4506
 
4506
 
4507
			#設置執行錯誤
4507
			#設置執行錯誤
4508
			$result["error"]=$rwd;
4508
			$result["error"]=$rwd;
4509
 
4509
 
4510
			#回傳結果
4510
			#回傳結果
4511
			return $result;
4511
			return $result;
4512
			
4512
 
4513
			}#if end	
4513
			}#if end
4514
			
4514
 
4515
		#取得 css 語法
4515
		#取得 css 語法
4516
		$result["content"]=$result["content"].$rwd["content"];	
4516
		$result["content"]=$result["content"].$rwd["content"];
4517
 
4517
 
4518
		#寬度小於 $conf["width"] 要設置menu類別爲不顯示.
4518
		#寬度小於 $conf["width"] 要設置menu類別爲不顯示.
4519
		#涵式說明
4519
		#涵式說明
4520
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
4520
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
4521
		#回傳結果:
4521
		#回傳結果:
Line 4536... Line 4536...
4536
		$rwd=css::rwd($conf["css::rwd"]);
4536
		$rwd=css::rwd($conf["css::rwd"]);
4537
		unset($conf["css::rwd"]);
4537
		unset($conf["css::rwd"]);
4538
 
4538
 
4539
		#如果建立rwd區塊失敗
4539
		#如果建立rwd區塊失敗
4540
		if($rwd["status"]==="false"){
4540
		if($rwd["status"]==="false"){
4541
			
4541
 
4542
			#設置執行不正常
4542
			#設置執行不正常
4543
			$result["status"]="false";
4543
			$result["status"]="false";
4544
 
4544
 
4545
			#設置執行錯誤
4545
			#設置執行錯誤
4546
			$result["error"]=$rwd;
4546
			$result["error"]=$rwd;
4547
 
4547
 
4548
			#回傳結果
4548
			#回傳結果
4549
			return $result;
4549
			return $result;
4550
			
4550
 
4551
			}#if end	
4551
			}#if end
4552
			
4552
 
4553
		#取得 css 語法
4553
		#取得 css 語法
4554
		$result["content"]=$result["content"].$rwd["content"];	
4554
		$result["content"]=$result["content"].$rwd["content"];
4555
 
4555
 
4556
		#滑到與 focus a 時的樣式
4556
		#滑到與 focus a 時的樣式
4557
		#函式說明:
4557
		#函式說明:
4558
		#創建針對html標籤的立即css樣式或限定套用類型的css樣式.
4558
		#創建針對html標籤的立即css樣式或限定套用類型的css樣式.
4559
		#回傳的結果:
4559
		#回傳的結果:
Line 4572... Line 4572...
4572
		$createApplyCssStyle=css::createApplyCssStyle($conf["css::createApplyCssStyle"]);
4572
		$createApplyCssStyle=css::createApplyCssStyle($conf["css::createApplyCssStyle"]);
4573
		unset($conf["css::createApplyCssStyle"]);
4573
		unset($conf["css::createApplyCssStyle"]);
4574
 
4574
 
4575
		#如果建立失敗
4575
		#如果建立失敗
4576
		if($createApplyCssStyle["status"]==="false"){
4576
		if($createApplyCssStyle["status"]==="false"){
4577
			
4577
 
4578
			#設置執行不正常
4578
			#設置執行不正常
4579
			$result["status"]="false";
4579
			$result["status"]="false";
4580
 
4580
 
4581
			#設置執行錯誤
4581
			#設置執行錯誤
4582
			$result["error"]=$createApplyCssStyle;
4582
			$result["error"]=$createApplyCssStyle;
4583
 
4583
 
4584
			#回傳結果
4584
			#回傳結果
4585
			return $result;
4585
			return $result;
4586
			
4586
 
4587
			}#if end
4587
			}#if end
4588
 
4588
 
4589
		#取得 css 語法
4589
		#取得 css 語法
4590
		$result["content"]=$result["content"].$createApplyCssStyle["content"];
4590
		$result["content"]=$result["content"].$createApplyCssStyle["content"];
4591
		
4591
 
4592
		#menu bar
4592
		#menu bar
4593
		#函式說明:
4593
		#函式說明:
4594
		#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
4594
		#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
4595
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
4595
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
4596
		#$result["functin"],字串,當前函數的名稱.
4596
		#$result["functin"],字串,當前函數的名稱.
Line 4619... Line 4619...
4619
		$divSection=css::divSection($conf["css::divSection"]);
4619
		$divSection=css::divSection($conf["css::divSection"]);
4620
		unset($conf["css::divSection"]);
4620
		unset($conf["css::divSection"]);
4621
 
4621
 
4622
		#如果建立div區塊失敗
4622
		#如果建立div區塊失敗
4623
		if($divSection["status"]==="false"){
4623
		if($divSection["status"]==="false"){
4624
			
4624
 
4625
			#設置執行不正常
4625
			#設置執行不正常
4626
			$result["status"]="false";
4626
			$result["status"]="false";
4627
 
4627
 
4628
			#設置執行錯誤
4628
			#設置執行錯誤
4629
			$result["error"]=$divSection;
4629
			$result["error"]=$divSection;
4630
 
4630
 
4631
			#回傳結果
4631
			#回傳結果
4632
			return $result;
4632
			return $result;
4633
			
4633
 
4634
			}#if end
4634
			}#if end
4635
 
4635
 
4636
		#$conf["firstEleId"],字串,選單的擡頭元素id.
4636
		#$conf["firstEleId"],字串,選單的擡頭元素id.
4637
		#函式說明:
4637
		#函式說明:
4638
		#將要執行的script語法透過該函式執行(會在程式外層用<script></script>包起來).
4638
		#將要執行的script語法透過該函式執行(會在程式外層用<script></script>包起來).
Line 4645... Line 4645...
4645
		#$conf["script"],字串,要執行的javaScript語法.
4645
		#$conf["script"],字串,要執行的javaScript語法.
4646
		$conf["javaScript::toScript"]["script"]=
4646
		$conf["javaScript::toScript"]["script"]=
4647
		"
4647
		"
4648
		//get logo element
4648
		//get logo element
4649
		var logo=document.getElementById('".$conf["firstEleId"]."');
4649
		var logo=document.getElementById('".$conf["firstEleId"]."');
4650
		
4650
 
4651
		//click logo trigger event
4651
		//click logo trigger event
4652
		logo.addEventListener('click',function(){
4652
		logo.addEventListener('click',function(){
4653
			
4653
 
4654
			//小畫面才要顯示
4654
			//小畫面才要顯示
4655
			if(document.body.getBoundingClientRect().width<".(int)($conf["width"])."){
4655
			if(document.body.getBoundingClientRect().width<".(int)($conf["width"])."){
4656
		
4656
 
4657
				//get menu class
4657
				//get menu class
4658
				var menus=document.getElementsByClassName('".$conf["otherEleClass"]."');
4658
				var menus=document.getElementsByClassName('".$conf["otherEleClass"]."');
4659
		
4659
 
4660
				//隱藏option
4660
				//隱藏option
4661
				if(menus[0].style.display==='block' && menus[0].style.marginLeft==='unset'){
4661
				if(menus[0].style.display==='block' && menus[0].style.marginLeft==='unset'){
4662
					
4662
 
4663
					//each option
4663
					//each option
4664
					for(var i=0;i<menus.length;i++){
4664
					for(var i=0;i<menus.length;i++){
4665
				
4665
 
4666
						//restore menu style
4666
						//restore menu style
4667
						menus[i].style.display='';
4667
						menus[i].style.display='';
4668
						menus[i].style.marginLeft='';
4668
						menus[i].style.marginLeft='';
4669
							
4669
 
4670
						}//for end
4670
						}//for end
4671
						
4671
 
4672
					}//if end
4672
					}//if end
4673
				
4673
 
4674
				//反之要顯示選項
4674
				//反之要顯示選項
4675
				else{
4675
				else{
4676
		
4676
 
4677
					//each option
4677
					//each option
4678
					for(var i=0;i<menus.length;i++){
4678
					for(var i=0;i<menus.length;i++){
4679
		
4679
 
4680
						//顯現option
4680
						//顯現option
4681
						menus[i].style.display='block';
4681
						menus[i].style.display='block';
4682
						menus[i].style.marginLeft='unset';
4682
						menus[i].style.marginLeft='unset';
4683
							
4683
 
4684
						}//for end
4684
						}//for end
4685
							
4685
 
4686
					}//else end
4686
					}//else end
4687
					
4687
 
4688
				}//if end
4688
				}//if end
4689
						
4689
 
4690
			});//click evnet end
4690
			});//click evnet end
4691
			
4691
 
4692
		//當視窗大小改變,要觸發function
4692
		//當視窗大小改變,要觸發function
4693
		window.addEventListener('resize',function(){
4693
		window.addEventListener('resize',function(){
4694
 
4694
 
4695
			//debug
4695
			//debug
4696
			if(window.qbpwcf.bug){
4696
			if(window.qbpwcf.bug){
4697
			
4697
 
4698
				console.log(document.body.getBoundingClientRect().width);
4698
				console.log(document.body.getBoundingClientRect().width);
4699
			
4699
 
4700
				}//if end
4700
				}//if end
4701
			
4701
 
4702
			//get menu class
4702
			//get menu class
4703
			var menus=document.getElementsByClassName('".$conf["otherEleClass"]."');
4703
			var menus=document.getElementsByClassName('".$conf["otherEleClass"]."');
4704
	
4704
 
4705
			//each option
4705
			//each option
4706
			for(var i=0;i<menus.length;i++){
4706
			for(var i=0;i<menus.length;i++){
4707
	
4707
 
4708
				//restore menu style
4708
				//restore menu style
4709
				menus[i].style.display='';
4709
				menus[i].style.display='';
4710
				menus[i].style.marginLeft='';
4710
				menus[i].style.marginLeft='';
4711
				
4711
 
4712
				}//for end
4712
				}//for end
4713
				
4713
 
4714
			});//resize event end
4714
			});//resize event end
4715
			
4715
 
4716
		//初始畫面若寬於Logo+選項
4716
		//初始畫面若寬於Logo+選項
4717
		if(document.body.getBoundingClientRect().width>=".(int)($conf["width"])."){
4717
		if(document.body.getBoundingClientRect().width>=".(int)($conf["width"])."){
4718
		
4718
 
4719
			//get menu class
4719
			//get menu class
4720
			var menus=document.getElementsByClassName('".$conf["otherEleClass"]."');
4720
			var menus=document.getElementsByClassName('".$conf["otherEleClass"]."');
4721
	
4721
 
4722
			//each option
4722
			//each option
4723
			for(var i=0;i<menus.length;i++){
4723
			for(var i=0;i<menus.length;i++){
4724
	
4724
 
4725
				//restore menu style
4725
				//restore menu style
4726
				menus[i].style.display='';
4726
				menus[i].style.display='';
4727
				menus[i].style.marginLeft='';
4727
				menus[i].style.marginLeft='';
4728
				
4728
 
4729
				}//for end
4729
				}//for end
4730
		
4730
 
4731
			}//if end
4731
			}//if end
4732
			
4732
 
4733
		";
4733
		";
4734
		#可省略參數:
4734
		#可省略參數:
4735
		#$conf["onReady"],字串,是否要在網頁完全載入後再執行,"false"為不等載入完就先執行,預設為"true"要等載入完再執行.
4735
		#$conf["onReady"],字串,是否要在網頁完全載入後再執行,"false"為不等載入完就先執行,預設為"true"要等載入完再執行.
4736
		#$conf["onReady"]="true";
4736
		#$conf["onReady"]="true";
4737
		#$conf["globalJs"],字串陣列,為要放入<script>標籤的js全域變數.
4737
		#$conf["globalJs"],字串陣列,為要放入<script>標籤的js全域變數.
Line 4743... Line 4743...
4743
		$toScript=javaScript::toScript($conf["javaScript::toScript"]);
4743
		$toScript=javaScript::toScript($conf["javaScript::toScript"]);
4744
		unset($conf["javaScript::toScript"]);
4744
		unset($conf["javaScript::toScript"]);
4745
 
4745
 
4746
		#如果建立div區塊失敗
4746
		#如果建立div區塊失敗
4747
		if($toScript["status"]==="false"){
4747
		if($toScript["status"]==="false"){
4748
			
4748
 
4749
			#設置執行不正常
4749
			#設置執行不正常
4750
			$result["status"]="false";
4750
			$result["status"]="false";
4751
 
4751
 
4752
			#設置執行錯誤
4752
			#設置執行錯誤
4753
			$result["error"]=$toScript;
4753
			$result["error"]=$toScript;
4754
 
4754
 
4755
			#回傳結果
4755
			#回傳結果
4756
			return $result;
4756
			return $result;
4757
			
4757
 
4758
			}#if end
4758
			}#if end
4759
 
4759
 
4760
		#取得 script 語法
4760
		#取得 script 語法
4761
		$result["content"]=$result["content"].$toScript["content"];
4761
		$result["content"]=$result["content"].$toScript["content"];
4762
 
4762
 
4763
		#設置執行正常 
4763
		#設置執行正常
4764
		$result["status"]="true";
4764
		$result["status"]="true";
4765
 
4765
 
4766
		#取得 html 語法
4766
		#取得 html 語法
4767
		$result["content"]=$result["content"].$divSection["content"];
4767
		$result["content"]=$result["content"].$divSection["content"];
4768
		
4768
 
4769
		#回傳結果
4769
		#回傳結果
4770
		return $result;
4770
		return $result;
4771
		
4771
 
4772
		}#function rwdMenu end
4772
		}#function rwdMenu end
4773
 
4773
 
4774
	/*
4774
	/*
4775
	#函式說明:
4775
	#函式說明:
4776
	#將畫面分成數欄
4776
	#將畫面分成數欄
Line 4792... Line 4792...
4792
	#無.
4792
	#無.
4793
	#備註:
4793
	#備註:
4794
	#無.
4794
	#無.
4795
	*/
4795
	*/
4796
	public static function cols(&$conf=array()){
4796
	public static function cols(&$conf=array()){
4797
	
4797
 
4798
		#初始化要回傳的結果
4798
		#初始化要回傳的結果
4799
		$result=array();
4799
		$result=array();
4800
 
4800
 
4801
		#取得當前執行的函數名稱
4801
		#取得當前執行的函數名稱
4802
		$result["function"]=__FUNCTION__;
4802
		$result["function"]=__FUNCTION__;
Line 4906... Line 4906...
4906
 
4906
 
4907
			#回傳結果
4907
			#回傳結果
4908
			return $result;
4908
			return $result;
4909
 
4909
 
4910
			}#if end
4910
			}#if end
4911
		
4911
 
4912
		#初始化要回傳的語法
4912
		#初始化要回傳的語法
4913
		$result["content"]="";
4913
		$result["content"]="";
4914
		
4914
 
4915
		#欄位計數
4915
		#欄位計數
4916
		$colsc=count($conf["content"]);
4916
		$colsc=count($conf["content"]);
4917
		
4917
 
4918
		#有分成幾個欄位
4918
		#有分成幾個欄位
4919
		foreach($conf["content"] as $index => $col){
4919
		foreach($conf["content"] as $index => $col){
4920
		
4920
 
4921
			#函式說明:
4921
			#函式說明:
4922
			#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
4922
			#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
4923
			#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
4923
			#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
4924
			#$result["functin"],字串,當前函數的名稱.
4924
			#$result["functin"],字串,當前函數的名稱.
4925
			#$result["error"],陣列,錯訊訊息.
4925
			#$result["error"],陣列,錯訊訊息.
Line 4944... Line 4944...
4944
			#$conf["textAlignCenter"]="true";
4944
			#$conf["textAlignCenter"]="true";
4945
			#$conf["data"],字串陣列,每個要設置的屬性data內容,例如array("option1"=>"A","option2"=>"B"),預設不使用.
4945
			#$conf["data"],字串陣列,每個要設置的屬性data內容,例如array("option1"=>"A","option2"=>"B"),預設不使用.
4946
			#$conf["data"]=array();
4946
			#$conf["data"]=array();
4947
			$divSection=css::divSection($conf["css::divSection"]);
4947
			$divSection=css::divSection($conf["css::divSection"]);
4948
			unset($conf["css::divSection"]);
4948
			unset($conf["css::divSection"]);
4949
		
4949
 
4950
			#如果檢查參數失敗
4950
			#如果檢查參數失敗
4951
			if($divSection["status"]==="false"){
4951
			if($divSection["status"]==="false"){
4952
 
4952
 
4953
				#設置執行不正常
4953
				#設置執行不正常
4954
				$result["status"]="false";
4954
				$result["status"]="false";
Line 4958... Line 4958...
4958
 
4958
 
4959
				#回傳結果
4959
				#回傳結果
4960
				return $result;
4960
				return $result;
4961
 
4961
 
4962
				}#if end
4962
				}#if end
4963
				
4963
 
4964
			#串接語法
4964
			#串接語法
4965
			$result["content"]=$result["content"].$divSection["content"];
4965
			$result["content"]=$result["content"].$divSection["content"];
4966
		
4966
 
4967
			}#foreach end
4967
			}#foreach end
4968
	
4968
 
4969
		#設置執行正常
4969
		#設置執行正常
4970
		$result["status"]="true";
4970
		$result["status"]="true";
4971
	
4971
 
4972
		#回傳結果
4972
		#回傳結果
4973
		return $result;
4973
		return $result;
4974
	
4974
 
4975
		}#function cols end
4975
		}#function cols end
4976
 
4976
 
4977
	/*
4977
	/*
4978
	#函式說明:
4978
	#函式說明:
4979
	#建立永遠飄在上頭的選單,且分為左中右三塊,左邊藏東西的icon,中間是到首頁的Logo,右邊也是藏東西的icon.
4979
	#建立永遠飄在上頭的選單,且分為左中右三塊,左邊藏東西的icon,中間是到首頁的Logo,右邊也是藏東西的icon.
Line 4990... Line 4990...
4990
	$conf["content"]=array();
4990
	$conf["content"]=array();
4991
	#可省略參數:
4991
	#可省略參數:
4992
	#$conf["style"],二維字串陣列,三個項目的樣式,預設為array(array("text-align:left;"),array("text-align:ceter;"),array("text-align:right"));
4992
	#$conf["style"],二維字串陣列,三個項目的樣式,預設為array(array("text-align:left;"),array("text-align:ceter;"),array("text-align:right"));
4993
	#$conf["style"]=""
4993
	#$conf["style"]=""
4994
	#$conf["top"],字串,項目距離上部的距離,預設不指定,單位爲px.
4994
	#$conf["top"],字串,項目距離上部的距離,預設不指定,單位爲px.
4995
	#$conf["top"]=""; 
4995
	#$conf["top"]="";
4996
	#$conf["bgColor"],字串,選單的背景顏色,預設爲"#FFFFFF".
4996
	#$conf["bgColor"],字串,選單的背景顏色,預設爲"#FFFFFF".
4997
	#$conf["bgColor"]="";
4997
	#$conf["bgColor"]="";
4998
	#參考資料:
4998
	#參考資料:
4999
	#無.
4999
	#無.
5000
	#備註:
5000
	#備註:
5001
	#建構中...
5001
	#建構中...
5002
	*/
5002
	*/
5003
	public static function menu3sec(&$conf){
5003
	public static function menu3sec(&$conf){
5004
	
5004
 
5005
		
5005
 
5006
	
5006
 
5007
		}#function menu3sec end	
5007
		}#function menu3sec end
5008
 
5008
 
5009
	/*
5009
	/*
5010
	#函式說明:
5010
	#函式說明:
5011
	#建立放置多個圖片與文字說明的內容,寬畫面會呈現一列多個圖示,小畫面會一列一個圖示.
5011
	#建立放置多個圖片與文字說明的內容,寬畫面會呈現一列多個圖示,小畫面會一列一個圖示.
5012
	#回傳結果:
5012
	#回傳結果:
5013
	#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
5013
	#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
5014
	#$result["error"],錯誤訊息.
5014
	#$result["error"],錯誤訊息.
5015
	#$result["function"],當前執行的函數名稱.
5015
	#$result["function"],當前執行的函數名稱.
5016
	#$result["content"],語法.
5016
	#$result["content"],語法.
5017
	#$result["argu"],使用的參數.
5017
	#$result["argu"],使用的參數.
5018
	#必填參數:	
5018
	#必填參數:
5019
	#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑.
5019
	#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑.
5020
	$conf["fileArgu"]=__FILE__;
5020
	$conf["fileArgu"]=__FILE__;
5021
	#可省略參數:
5021
	#可省略參數:
5022
	#$conf["maxWidth"],字串,小於多少寬度要從span選單變成div選單,單位爲px,預設爲600px.
5022
	#$conf["maxWidth"],字串,小於多少寬度要從span選單變成div選單,單位爲px,預設爲600px.
5023
	#$conf["maxWidth"]="600px";
5023
	#$conf["maxWidth"]="600px";
Line 5053... Line 5053...
5053
	#無.
5053
	#無.
5054
	#備註:
5054
	#備註:
5055
	#無.
5055
	#無.
5056
	*/
5056
	*/
5057
	public static function rwdIcon(&$conf){
5057
	public static function rwdIcon(&$conf){
5058
		
5058
 
5059
		#初始化要回傳的結果
5059
		#初始化要回傳的結果
5060
		$result=array();
5060
		$result=array();
5061
 
5061
 
5062
		#取得當前執行的函數名稱
5062
		#取得當前執行的函數名稱
5063
		$result["function"]=__FUNCTION__;
5063
		$result["function"]=__FUNCTION__;
Line 5167... Line 5167...
5167
 
5167
 
5168
			#回傳結果
5168
			#回傳結果
5169
			return $result;
5169
			return $result;
5170
 
5170
 
5171
			}#if end
5171
			}#if end
5172
		
5172
 
5173
		#初始化要回傳的語法
5173
		#初始化要回傳的語法
5174
		$result["content"]="";
5174
		$result["content"]="";
5175
		
5175
 
5176
		#如果沒有設置 comment
5176
		#如果沒有設置 comment
5177
		if( isset($conf["icon"]) && !isset($conf["comment"]) ){
5177
		if( isset($conf["icon"]) && !isset($conf["comment"]) ){
5178
			
5178
 
5179
			#針對每個圖示 
5179
			#針對每個圖示
5180
			foreach($conf["icon"] as $index => $iconUrl){
5180
			foreach($conf["icon"] as $index => $iconUrl){
5181
			
5181
 
5182
				#設置預設的 comment
5182
				#設置預設的 comment
5183
				$conf["comment"][$index]="icon";
5183
				$conf["comment"][$index]="icon";
5184
			
5184
 
5185
				}#if end
5185
				}#if end
5186
			
5186
 
5187
			}#foreach end
5187
			}#foreach end
5188
		
5188
 
5189
		#寬度小於 600px 要設置 block 的 product_list
5189
		#寬度小於 600px 要設置 block 的 product_list
5190
		#函式說明:
5190
		#函式說明:
5191
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
5191
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
5192
		#回傳結果:
5192
		#回傳結果:
5193
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
5193
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
Line 5207... Line 5207...
5207
		$rwd=css::rwd($conf["css::rwd"]);
5207
		$rwd=css::rwd($conf["css::rwd"]);
5208
		unset($conf["css::rwd"]);
5208
		unset($conf["css::rwd"]);
5209
 
5209
 
5210
		#如果建立rwd區塊失敗
5210
		#如果建立rwd區塊失敗
5211
		if($rwd["status"]==="false"){
5211
		if($rwd["status"]==="false"){
5212
			
5212
 
5213
			#設置錯誤訊息
5213
			#設置錯誤訊息
5214
			$result["error"]=$rwd;
5214
			$result["error"]=$rwd;
5215
			
5215
 
5216
			#設置錯誤識別
5216
			#設置錯誤識別
5217
			$result["status"]="false";
5217
			$result["status"]="false";
5218
			
5218
 
5219
			#結束運行
5219
			#結束運行
5220
			return $result;
5220
			return $result;
5221
			
5221
 
5222
			}#if end
5222
			}#if end
5223
			
5223
 
5224
		#儲存 css 語法
5224
		#儲存 css 語法
5225
		$result["content"]=$result["content"].$rwd["content"];	
5225
		$result["content"]=$result["content"].$rwd["content"];
5226
 
5226
 
5227
		#寬度大於 600px 要設置 inline-block 的 product_list
5227
		#寬度大於 600px 要設置 inline-block 的 product_list
5228
		#函式說明:
5228
		#函式說明:
5229
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
5229
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
5230
		#回傳結果:
5230
		#回傳結果:
Line 5245... Line 5245...
5245
		$rwd=css::rwd($conf["css::rwd"]);
5245
		$rwd=css::rwd($conf["css::rwd"]);
5246
		unset($conf["css::rwd"]);
5246
		unset($conf["css::rwd"]);
5247
 
5247
 
5248
		#如果建立rwd區塊失敗
5248
		#如果建立rwd區塊失敗
5249
		if($rwd["status"]==="false"){
5249
		if($rwd["status"]==="false"){
5250
			
5250
 
5251
			#設置錯誤訊息
5251
			#設置錯誤訊息
5252
			$result["error"]=$rwd;
5252
			$result["error"]=$rwd;
5253
			
5253
 
5254
			#設置錯誤識別
5254
			#設置錯誤識別
5255
			$result["status"]="false";
5255
			$result["status"]="false";
5256
			
5256
 
5257
			#結束運行
5257
			#結束運行
5258
			return $result;
5258
			return $result;
5259
			
5259
 
5260
			}#if end
5260
			}#if end
5261
			
5261
 
5262
		#儲存 css 語法
5262
		#儲存 css 語法
5263
		$result["content"]=$result["content"].$rwd["content"];
5263
		$result["content"]=$result["content"].$rwd["content"];
5264
 
5264
 
5265
		#建立 product_list_div hover 時會出現線條的樣式
5265
		#建立 product_list_div hover 時會出現線條的樣式
5266
		#函式說明:
5266
		#函式說明:
Line 5281... Line 5281...
5281
		$createApplyCssStyle=css::createApplyCssStyle($conf["css::createApplyCssStyle"]);
5281
		$createApplyCssStyle=css::createApplyCssStyle($conf["css::createApplyCssStyle"]);
5282
		unset($conf["css::createApplyCssStyle"]);
5282
		unset($conf["css::createApplyCssStyle"]);
5283
 
5283
 
5284
		#如果建立失敗
5284
		#如果建立失敗
5285
		if($createApplyCssStyle["status"]==="false"){
5285
		if($createApplyCssStyle["status"]==="false"){
5286
			
5286
 
5287
			#設置錯誤訊息
5287
			#設置錯誤訊息
5288
			$result["error"]=$createApplyCssStyle;
5288
			$result["error"]=$createApplyCssStyle;
5289
			
5289
 
5290
			#設置錯誤識別
5290
			#設置錯誤識別
5291
			$result["status"]="false";
5291
			$result["status"]="false";
5292
			
5292
 
5293
			#結束運行
5293
			#結束運行
5294
			return $result;
5294
			return $result;
5295
			
5295
 
5296
			}#if end
5296
			}#if end
5297
 
5297
 
5298
		#儲存 css 語法
5298
		#儲存 css 語法
5299
		$result["content"]=$result["content"].$createApplyCssStyle["content"];
5299
		$result["content"]=$result["content"].$createApplyCssStyle["content"];
5300
			
5300
 
5301
		#初始化儲存 icon & comment
5301
		#初始化儲存 icon & comment
5302
		$iconGroup=array();	
5302
		$iconGroup=array();
5303
			
5303
 
5304
		#如果有設置 icon
5304
		#如果有設置 icon
5305
		if(isset($conf["icon"])){	
5305
		if(isset($conf["icon"])){
5306
				
5306
 
5307
			#針對每個icon
5307
			#針對每個icon
5308
			foreach($conf["icon"] as $index => $icon){
5308
			foreach($conf["icon"] as $index => $icon){
5309
			
5309
 
5310
				#圖片
5310
				#圖片
5311
				#函數說明:
5311
				#函數說明:
5312
				#用data:mimeType;base64,imgVar的形式來提供圖片的連結,亦即圖片儲存在變數裡面,本函式包含顯示圖片的語法.
5312
				#用data:mimeType;base64,imgVar的形式來提供圖片的連結,亦即圖片儲存在變數裡面,本函式包含顯示圖片的語法.
5313
				#回傳結果:
5313
				#回傳結果:
5314
				#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
5314
				#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
5315
				#$result["error"],錯誤訊息
5315
				#$result["error"],錯誤訊息
5316
				#$result["content"],圖片的連結資訊
5316
				#$result["content"],圖片的連結資訊
5317
				#$result["function"],當前執行的函數名稱 
5317
				#$result["function"],當前執行的函數名稱
5318
				#必填參數:
5318
				#必填參數:
5319
				#$conf["imgPosition"],要轉存成2元碼的圖片檔案位置與名稱
5319
				#$conf["imgPosition"],要轉存成2元碼的圖片檔案位置與名稱
5320
				$conf["img::data"]["imgPosition"]=$icon;
5320
				$conf["img::data"]["imgPosition"]=$icon;
5321
				#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑.
5321
				#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑.
5322
				$conf["img::data"]["fileArgu"]=$conf["fileArgu"];
5322
				$conf["img::data"]["fileArgu"]=$conf["fileArgu"];
Line 5342... Line 5342...
5342
				#如果建立圖片失敗
5342
				#如果建立圖片失敗
5343
				if($data["status"]==="false"){
5343
				if($data["status"]==="false"){
5344
 
5344
 
5345
					#設置錯誤訊息
5345
					#設置錯誤訊息
5346
					$result["error"]=$data;
5346
					$result["error"]=$data;
5347
					
5347
 
5348
					#設置錯誤識別
5348
					#設置錯誤識別
5349
					$result["status"]="false";
5349
					$result["status"]="false";
5350
					
5350
 
5351
					#結束運行
5351
					#結束運行
5352
					return $result;
5352
					return $result;
5353
 
5353
 
5354
					}#if end
5354
					}#if end
5355
 
5355
 
Line 5382... Line 5382...
5382
				$iconDivSection=css::divSection($conf["css::divSection"]);
5382
				$iconDivSection=css::divSection($conf["css::divSection"]);
5383
				unset($conf["css::divSection"]);
5383
				unset($conf["css::divSection"]);
5384
 
5384
 
5385
				#如果建立div區塊失敗
5385
				#如果建立div區塊失敗
5386
				if($iconDivSection["status"]==="false"){
5386
				if($iconDivSection["status"]==="false"){
5387
					
5387
 
5388
					#設置錯誤訊息
5388
					#設置錯誤訊息
5389
					$result["error"]=$iconDivSection;
5389
					$result["error"]=$iconDivSection;
5390
					
5390
 
5391
					#設置錯誤識別
5391
					#設置錯誤識別
5392
					$result["status"]="false";
5392
					$result["status"]="false";
5393
					
5393
 
5394
					#結束運行
5394
					#結束運行
5395
					return $result;
5395
					return $result;
5396
					
5396
 
5397
					}#if end
5397
					}#if end
5398
					
5398
 
5399
				#函式說明:
5399
				#函式說明:
5400
				#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
5400
				#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
5401
				#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
5401
				#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
5402
				#$result["functin"],字串,當前函數的名稱.
5402
				#$result["functin"],字串,當前函數的名稱.
5403
				#$result["error"],陣列,錯訊訊息.
5403
				#$result["error"],陣列,錯訊訊息.
Line 5425... Line 5425...
5425
				$commentDivSection=css::divSection($conf["css::divSection"]);
5425
				$commentDivSection=css::divSection($conf["css::divSection"]);
5426
				unset($conf["css::divSection"]);
5426
				unset($conf["css::divSection"]);
5427
 
5427
 
5428
				#如果建立div區塊失敗
5428
				#如果建立div區塊失敗
5429
				if($commentDivSection["status"]==="false"){
5429
				if($commentDivSection["status"]==="false"){
5430
					
5430
 
5431
					#設置錯誤訊息
5431
					#設置錯誤訊息
5432
					$result["error"]=$commentDivSection;
5432
					$result["error"]=$commentDivSection;
5433
					
5433
 
5434
					#設置錯誤識別
5434
					#設置錯誤識別
5435
					$result["status"]="false";
5435
					$result["status"]="false";
5436
					
5436
 
5437
					#結束運行
5437
					#結束運行
5438
					return $result;
5438
					return $result;
5439
					
5439
 
5440
					}#if end
5440
					}#if end
5441
					
5441
 
5442
				#函式說明:
5442
				#函式說明:
5443
				#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
5443
				#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
5444
				#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
5444
				#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
5445
				#$result["functin"],字串,當前函數的名稱.
5445
				#$result["functin"],字串,當前函數的名稱.
5446
				#$result["error"],陣列,錯訊訊息.
5446
				#$result["error"],陣列,錯訊訊息.
Line 5468... Line 5468...
5468
				$divSection=css::divSection($conf["css::divSection"]);
5468
				$divSection=css::divSection($conf["css::divSection"]);
5469
				unset($conf["css::divSection"]);
5469
				unset($conf["css::divSection"]);
5470
 
5470
 
5471
				#如果建立div區塊失敗
5471
				#如果建立div區塊失敗
5472
				if($divSection["status"]==="false"){
5472
				if($divSection["status"]==="false"){
5473
					
5473
 
5474
					#設置錯誤訊息
5474
					#設置錯誤訊息
5475
					$result["error"]=$divSection;
5475
					$result["error"]=$divSection;
5476
					
5476
 
5477
					#設置錯誤識別
5477
					#設置錯誤識別
5478
					$result["status"]="false";
5478
					$result["status"]="false";
5479
					
5479
 
5480
					#結束運行
5480
					#結束運行
5481
					return $result;
5481
					return $result;
5482
					
5482
 
5483
					}#if end
5483
					}#if end
5484
					
5484
 
5485
				#儲存 icon & comment 語法
5485
				#儲存 icon & comment 語法
5486
				$iconGroup[]=$divSection["content"];
5486
				$iconGroup[]=$divSection["content"];
5487
			
5487
 
5488
				}#foreach end
5488
				}#foreach end
5489
				
5489
 
5490
			}#if end
5490
			}#if end
5491
		
5491
 
5492
		#background
5492
		#background
5493
		#函式說明:
5493
		#函式說明:
5494
		#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
5494
		#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
5495
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
5495
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
5496
		#$result["functin"],字串,當前函數的名稱.
5496
		#$result["functin"],字串,當前函數的名稱.
Line 5500... Line 5500...
5500
		#$conf["contentArray"],字串陣列,要放入的內容陣列.
5500
		#$conf["contentArray"],字串陣列,要放入的內容陣列.
5501
		$conf["css::divSection"]["contentArray"]=$iconGroup;
5501
		$conf["css::divSection"]["contentArray"]=$iconGroup;
5502
		#可省略參數
5502
		#可省略參數
5503
		#$conf["id"],字串,div區塊的id.
5503
		#$conf["id"],字串,div區塊的id.
5504
		#$conf["id"]="";
5504
		#$conf["id"]="";
5505
		
5505
 
5506
		#如果有設置 bgImg
5506
		#如果有設置 bgImg
5507
		if(isset($conf["bgImg"])){
5507
		if(isset($conf["bgImg"])){
5508
		
5508
 
5509
			#$conf["styleAttr"],字串陣列,給div區段要套用的style樣式屬性.
5509
			#$conf["styleAttr"],字串陣列,給div區段要套用的style樣式屬性.
5510
			$conf["css::divSection"]["styleAttr"]=array("background-image","text-align");
5510
			$conf["css::divSection"]["styleAttr"]=array("background-image","text-align");
5511
			#$conf["styleVal"],字串陣列,給div區段要套用的style樣式數值.
5511
			#$conf["styleVal"],字串陣列,給div區段要套用的style樣式數值.
5512
			$conf["css::divSection"]["styleVal"]=array("url('".$conf["bgImg"]."')","center");
5512
			$conf["css::divSection"]["styleVal"]=array("url('".$conf["bgImg"]."')","center");
5513
				
5513
 
5514
			}#if end
5514
			}#if end
5515
			
5515
 
5516
		#反之為背景顏色
5516
		#反之為背景顏色
5517
		else{
5517
		else{
5518
		
5518
 
5519
			#$conf["styleAttr"],字串陣列,給div區段要套用的style樣式屬性.
5519
			#$conf["styleAttr"],字串陣列,給div區段要套用的style樣式屬性.
5520
			$conf["css::divSection"]["styleAttr"]=array("background-color","text-align");
5520
			$conf["css::divSection"]["styleAttr"]=array("background-color","text-align");
5521
			#$conf["styleVal"],字串陣列,給div區段要套用的style樣式數值.
5521
			#$conf["styleVal"],字串陣列,給div區段要套用的style樣式數值.
5522
			$conf["css::divSection"]["styleVal"]=array($conf["bgColor"],"center");
5522
			$conf["css::divSection"]["styleVal"]=array($conf["bgColor"],"center");
5523
		
5523
 
5524
			}#else end
5524
			}#else end
5525
				
5525
 
5526
		#$conf["class"],字串,div區段要套用的css樣式.
5526
		#$conf["class"],字串,div區段要套用的css樣式.
5527
		#$conf["class"]="bgStyle product_list";
5527
		#$conf["class"]="bgStyle product_list";
5528
		#$conf["title"],陣列,滑鼠移到上面時要顯示的內容,每個元素代表一列內容.
5528
		#$conf["title"],陣列,滑鼠移到上面時要顯示的內容,每個元素代表一列內容.
5529
		#$conf["title"]=array();
5529
		#$conf["title"]=array();
5530
		#$conf["oneScreenSize"],字串,div區塊是否要占一個螢幕的大小,預設為"false"不設定,"true"為設定成一個螢幕的大小.
5530
		#$conf["oneScreenSize"],字串,div區塊是否要占一個螢幕的大小,預設為"false"不設定,"true"為設定成一個螢幕的大小.
Line 5536... Line 5536...
5536
		$divSection=css::divSection($conf["css::divSection"]);
5536
		$divSection=css::divSection($conf["css::divSection"]);
5537
		unset($conf["css::divSection"]);
5537
		unset($conf["css::divSection"]);
5538
 
5538
 
5539
		#如果建立div區塊失敗
5539
		#如果建立div區塊失敗
5540
		if($divSection["status"]==="false"){
5540
		if($divSection["status"]==="false"){
5541
			
5541
 
5542
			#設置錯誤訊息
5542
			#設置錯誤訊息
5543
			$result["error"]=$divSection;
5543
			$result["error"]=$divSection;
5544
			
5544
 
5545
			#設置錯誤識別
5545
			#設置錯誤識別
5546
			$result["status"]="false";
5546
			$result["status"]="false";
5547
			
5547
 
5548
			#結束運行
5548
			#結束運行
5549
			return $result;
5549
			return $result;
5550
			
5550
 
5551
			}#if end
5551
			}#if end
5552
 
5552
 
5553
		#儲存語法
5553
		#儲存語法
5554
		$result["content"]=$result["content"].$divSection["content"];
5554
		$result["content"]=$result["content"].$divSection["content"];
5555
		
5555
 
5556
		#設置成功識別
5556
		#設置成功識別
5557
		$result["status"]="true";
5557
		$result["status"]="true";
5558
		
5558
 
5559
		#回傳結果
5559
		#回傳結果
5560
		return $result;
5560
		return $result;
5561
		
5561
 
5562
		}#function rwdIcon end
5562
		}#function rwdIcon end
5563
 
5563
 
5564
	/*
5564
	/*
5565
	#函式說明:
5565
	#函式說明:
5566
	#建立rwd的一列內容.
5566
	#建立rwd的一列內容.
Line 5589... Line 5589...
5589
	#無.
5589
	#無.
5590
	#備註:
5590
	#備註:
5591
	#參數 $conf["maxWidthWidths"] 的元素總只能都設100,要不然排版會亂掉.
5591
	#參數 $conf["maxWidthWidths"] 的元素總只能都設100,要不然排版會亂掉.
5592
	*/
5592
	*/
5593
	public static function rwdInlineBlock(&$conf){
5593
	public static function rwdInlineBlock(&$conf){
5594
	
5594
 
5595
		#初始化要回傳的結果
5595
		#初始化要回傳的結果
5596
		$result=array();
5596
		$result=array();
5597
 
5597
 
5598
		#取得當前執行的函數名稱
5598
		#取得當前執行的函數名稱
5599
		$result["function"]=__FUNCTION__;
5599
		$result["function"]=__FUNCTION__;
Line 5703... Line 5703...
5703
 
5703
 
5704
			#回傳結果
5704
			#回傳結果
5705
			return $result;
5705
			return $result;
5706
 
5706
 
5707
			}#if end
5707
			}#if end
5708
		
5708
 
5709
		#如果未指定 $conf["minWidthWidths"]
5709
		#如果未指定 $conf["minWidthWidths"]
5710
		if(!isset($conf["minWidthWidths"])){
5710
		if(!isset($conf["minWidthWidths"])){
5711
		
5711
 
5712
			#初始化儲存每個div的寬度
5712
			#初始化儲存每個div的寬度
5713
			$conf["minWidthWidths"]=array();
5713
			$conf["minWidthWidths"]=array();
5714
		
5714
 
5715
			#每個div的寬度一致且總和小於90
5715
			#每個div的寬度一致且總和小於90
5716
			$eachDivWidth=(int)(90/count($conf["target"]));
5716
			$eachDivWidth=(int)(90/count($conf["target"]));
5717
		
5717
 
5718
			#有幾個 $conf["target"] 就執行幾次
5718
			#有幾個 $conf["target"] 就執行幾次
5719
			foreach($conf["target"] as $target){
5719
			foreach($conf["target"] as $target){
5720
			
5720
 
5721
				#儲存 div 的寬度
5721
				#儲存 div 的寬度
5722
				$conf["minWidthWidths"][]=$eachDivWidth;
5722
				$conf["minWidthWidths"][]=$eachDivWidth;
5723
			
5723
 
5724
				}#foreach end
5724
				}#foreach end
5725
		
5725
 
5726
			}#if end
5726
			}#if end
5727
			
5727
 
5728
		#如果未指定 $conf["maxWidthWidths"]
5728
		#如果未指定 $conf["maxWidthWidths"]
5729
		if(!isset($conf["maxWidthWidths"])){
5729
		if(!isset($conf["maxWidthWidths"])){
5730
		
5730
 
5731
			#初始化儲存每個div的寬度
5731
			#初始化儲存每個div的寬度
5732
			$conf["maxWidthWidths"]=array();
5732
			$conf["maxWidthWidths"]=array();
5733
		
5733
 
5734
			#每個div的寬度皆為100
5734
			#每個div的寬度皆為100
5735
			$eachDivWidth="100";
5735
			$eachDivWidth="100";
5736
		
5736
 
5737
			#有幾個 $conf["target"] 就執行幾次
5737
			#有幾個 $conf["target"] 就執行幾次
5738
			foreach($conf["target"] as $target){
5738
			foreach($conf["target"] as $target){
5739
			
5739
 
5740
				#儲存 div 的寬度
5740
				#儲存 div 的寬度
5741
				$conf["maxWidthWidths"][]=$eachDivWidth;
5741
				$conf["maxWidthWidths"][]=$eachDivWidth;
5742
			
5742
 
5743
				}#foreach end
5743
				}#foreach end
5744
		
5744
 
5745
			}#if end
5745
			}#if end
5746
		
5746
 
5747
		#初始化要回傳的語法
5747
		#初始化要回傳的語法
5748
		$result["content"]="";
5748
		$result["content"]="";
5749
		
5749
 
5750
		#初始化儲存 inline block 的 div 的陣列
5750
		#初始化儲存 inline block 的 div 的陣列
5751
		$inlineBlockDiv=array();
5751
		$inlineBlockDiv=array();
5752
		
5752
 
5753
		#初始化儲存 div 的 class 清單
5753
		#初始化儲存 div 的 class 清單
5754
		$divClassList=array();
5754
		$divClassList=array();
5755
		
5755
 
5756
		#初始化儲存每個 div 的樣式屬性
5756
		#初始化儲存每個 div 的樣式屬性
5757
		$minStyleAttrs=array();
5757
		$minStyleAttrs=array();
5758
		
5758
 
5759
		#初始儲存每個 div 的樣式數值
5759
		#初始儲存每個 div 的樣式數值
5760
		$minStyleVals=array();
5760
		$minStyleVals=array();
5761
		
5761
 
5762
		#初始化儲存每個 div 的樣式屬性
5762
		#初始化儲存每個 div 的樣式屬性
5763
		$maxStyleAttrs=array();
5763
		$maxStyleAttrs=array();
5764
		
5764
 
5765
		#初始儲存每個 div 的樣式數值
5765
		#初始儲存每個 div 的樣式數值
5766
		$maxStyleVals=array();
5766
		$maxStyleVals=array();
5767
		
5767
 
5768
		#用於左右對稱的最左邊空div
5768
		#用於左右對稱的最左邊空div
5769
		#函式說明:
5769
		#函式說明:
5770
		#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
5770
		#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
5771
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
5771
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
5772
		#$result["functin"],字串,當前函數的名稱.
5772
		#$result["functin"],字串,當前函數的名稱.
Line 5791... Line 5791...
5791
		#$conf["textAlignCenter"],字串,div區塊是否要置中,預設為$conf["oneScreenSize"]的值,"false"為不置中,"true"代表要置中.
5791
		#$conf["textAlignCenter"],字串,div區塊是否要置中,預設為$conf["oneScreenSize"]的值,"false"為不置中,"true"代表要置中.
5792
		#$conf["textAlignCenter"]="";
5792
		#$conf["textAlignCenter"]="";
5793
		#$conf["data"],字串陣列,每個要設置的屬性data內容,例如array("option1"=>"A","option2"=>"B"),預設不使用.
5793
		#$conf["data"],字串陣列,每個要設置的屬性data內容,例如array("option1"=>"A","option2"=>"B"),預設不使用.
5794
		#$conf["data"]=array();
5794
		#$conf["data"]=array();
5795
		$divSection=css::divSection($conf["css::divSection"]);
5795
		$divSection=css::divSection($conf["css::divSection"]);
5796
		unset($conf["css::divSection"]);		
5796
		unset($conf["css::divSection"]);
5797
		
5797
 
5798
		#如果建立div失敗
5798
		#如果建立div失敗
5799
		if($divSection["status"]==="false"){
5799
		if($divSection["status"]==="false"){
5800
 
5800
 
5801
			#設置執行不正常
5801
			#設置執行不正常
5802
			$result["status"]="false";
5802
			$result["status"]="false";
Line 5806... Line 5806...
5806
 
5806
 
5807
			#回傳結果
5807
			#回傳結果
5808
			return $result;
5808
			return $result;
5809
 
5809
 
5810
			}#if end
5810
			}#if end
5811
			
5811
 
5812
		#儲存 divSection
5812
		#儲存 divSection
5813
		$inlineBlockDiv[]=$divSection["content"];
5813
		$inlineBlockDiv[]=$divSection["content"];
5814
		
5814
 
5815
		#儲存 div class
5815
		#儲存 div class
5816
		$divClassList[]=".".$conf["classHead"]."-left";
5816
		$divClassList[]=".".$conf["classHead"]."-left";
5817
		
5817
 
5818
		#儲存 div style attr
5818
		#儲存 div style attr
5819
		$minStyleAttrs[]=array("width");
5819
		$minStyleAttrs[]=array("width");
5820
		
5820
 
5821
		#儲存 div style attr
5821
		#儲存 div style attr
5822
		$maxStyleAttrs[]=array("width");
5822
		$maxStyleAttrs[]=array("width");
5823
		
5823
 
5824
		#針對每個 $conf["target"]
5824
		#針對每個 $conf["target"]
5825
		foreach($conf["target"] as $index=>$target){
5825
		foreach($conf["target"] as $index=>$target){
5826
		
5826
 
5827
			#函式說明:
5827
			#函式說明:
5828
			#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
5828
			#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
5829
			#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
5829
			#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
5830
			#$result["functin"],字串,當前函數的名稱.
5830
			#$result["functin"],字串,當前函數的名稱.
5831
			#$result["error"],陣列,錯訊訊息.
5831
			#$result["error"],陣列,錯訊訊息.
Line 5849... Line 5849...
5849
			#$conf["textAlignCenter"],字串,div區塊是否要置中,預設為$conf["oneScreenSize"]的值,"false"為不置中,"true"代表要置中.
5849
			#$conf["textAlignCenter"],字串,div區塊是否要置中,預設為$conf["oneScreenSize"]的值,"false"為不置中,"true"代表要置中.
5850
			#$conf["textAlignCenter"]="";
5850
			#$conf["textAlignCenter"]="";
5851
			#$conf["data"],字串陣列,每個要設置的屬性data內容,例如array("option1"=>"A","option2"=>"B"),預設不使用.
5851
			#$conf["data"],字串陣列,每個要設置的屬性data內容,例如array("option1"=>"A","option2"=>"B"),預設不使用.
5852
			#$conf["data"]=array();
5852
			#$conf["data"]=array();
5853
			$divSection=css::divSection($conf["css::divSection"]);
5853
			$divSection=css::divSection($conf["css::divSection"]);
5854
			unset($conf["css::divSection"]);		
5854
			unset($conf["css::divSection"]);
5855
			
5855
 
5856
			#如果建立div失敗
5856
			#如果建立div失敗
5857
			if($divSection["status"]==="false"){
5857
			if($divSection["status"]==="false"){
5858
 
5858
 
5859
				#設置執行不正常
5859
				#設置執行不正常
5860
				$result["status"]="false";
5860
				$result["status"]="false";
Line 5864... Line 5864...
5864
 
5864
 
5865
				#回傳結果
5865
				#回傳結果
5866
				return $result;
5866
				return $result;
5867
 
5867
 
5868
				}#if end
5868
				}#if end
5869
				
5869
 
5870
			#儲存 divSection
5870
			#儲存 divSection
5871
			$inlineBlockDiv[]=$divSection["content"];
5871
			$inlineBlockDiv[]=$divSection["content"];
5872
				
5872
 
5873
			#儲存 div class 到 divClassList	
5873
			#儲存 div class 到 divClassList
5874
			$divClassList[]=".".$conf["classHead"]."-".$index;	
5874
			$divClassList[]=".".$conf["classHead"]."-".$index;
5875
				
5875
 
5876
			#儲存 div style attr
5876
			#儲存 div style attr
5877
			$minStyleAttrs[]=array("width","padding");	
5877
			$minStyleAttrs[]=array("width","padding");
5878
		
5878
 
5879
			#初始儲存每個 div 的樣式數值
5879
			#初始儲存每個 div 的樣式數值
5880
			$minStyleVals[]=array($conf["minWidthWidths"][$index]."vw",$conf["padding"]);
5880
			$minStyleVals[]=array($conf["minWidthWidths"][$index]."vw",$conf["padding"]);
5881
			
5881
 
5882
			#儲存 max div style arrt
5882
			#儲存 max div style arrt
5883
			$maxStyleAttrs[]=array("width","padding");
5883
			$maxStyleAttrs[]=array("width","padding");
5884
			
5884
 
5885
			#初始儲存每個 max div 的樣式數值
5885
			#初始儲存每個 max div 的樣式數值
5886
			$maxStyleVals[]=array($conf["maxWidthWidths"][$index]."vw",$conf["padding"]);
5886
			$maxStyleVals[]=array($conf["maxWidthWidths"][$index]."vw",$conf["padding"]);
5887
				
5887
 
5888
			}#foreach end
5888
			}#foreach end
5889
						
5889
 
5890
		#函式說明:
5890
		#函式說明:
5891
		#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
5891
		#<div>區塊,裡面可以指定css的class樣式,可以指定提示文字.
5892
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
5892
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
5893
		#$result["functin"],字串,當前函數的名稱.
5893
		#$result["functin"],字串,當前函數的名稱.
5894
		#$result["error"],陣列,錯訊訊息.
5894
		#$result["error"],陣列,錯訊訊息.
Line 5912... Line 5912...
5912
		#$conf["textAlignCenter"],字串,div區塊是否要置中,預設為$conf["oneScreenSize"]的值,"false"為不置中,"true"代表要置中.
5912
		#$conf["textAlignCenter"],字串,div區塊是否要置中,預設為$conf["oneScreenSize"]的值,"false"為不置中,"true"代表要置中.
5913
		#$conf["textAlignCenter"]="";
5913
		#$conf["textAlignCenter"]="";
5914
		#$conf["data"],字串陣列,每個要設置的屬性data內容,例如array("option1"=>"A","option2"=>"B"),預設不使用.
5914
		#$conf["data"],字串陣列,每個要設置的屬性data內容,例如array("option1"=>"A","option2"=>"B"),預設不使用.
5915
		#$conf["data"]=array();
5915
		#$conf["data"]=array();
5916
		$divSection=css::divSection($conf["css::divSection"]);
5916
		$divSection=css::divSection($conf["css::divSection"]);
5917
		unset($conf["css::divSection"]);		
5917
		unset($conf["css::divSection"]);
5918
		
5918
 
5919
		#如果建立div失敗
5919
		#如果建立div失敗
5920
		if($divSection["status"]==="false"){
5920
		if($divSection["status"]==="false"){
5921
 
5921
 
5922
			#設置執行不正常
5922
			#設置執行不正常
5923
			$result["status"]="false";
5923
			$result["status"]="false";
Line 5927... Line 5927...
5927
 
5927
 
5928
			#回傳結果
5928
			#回傳結果
5929
			return $result;
5929
			return $result;
5930
 
5930
 
5931
			}#if end
5931
			}#if end
5932
			
5932
 
5933
		#串接 row div 語法
5933
		#串接 row div 語法
5934
		$result["content"]=$result["content"].$divSection["content"];
5934
		$result["content"]=$result["content"].$divSection["content"];
5935
				
5935
 
5936
		#初始化儲存寬度比例
5936
		#初始化儲存寬度比例
5937
		$width=0;
5937
		$width=0;
5938
		
5938
 
5939
		#加總大於 minWidth 每個 div 項目的寬度
5939
		#加總大於 minWidth 每個 div 項目的寬度
5940
		for($i=0;$i<count($conf["minWidthWidths"]);$i++){
5940
		for($i=0;$i<count($conf["minWidthWidths"]);$i++){
5941
		
5941
 
5942
			#加總寬度
5942
			#加總寬度
5943
			$width=$width+$conf["minWidthWidths"][$i];
5943
			$width=$width+$conf["minWidthWidths"][$i];
5944
		
5944
 
5945
			}#for end
5945
			}#for end
5946
			
5946
 
5947
		#如果小於100
5947
		#如果小於100
5948
		if($width<100){
5948
		if($width<100){
5949
		
5949
 
5950
			#取得左邊空div的vw
5950
			#取得左邊空div的vw
5951
			$leftEmptyDivWidth=((100-$width)/2)."vw";
5951
			$leftEmptyDivWidth=((100-$width)/2)."vw";
5952
		
5952
 
5953
			}#if end
5953
			}#if end
5954
			
5954
 
5955
		#反之
5955
		#反之
5956
		else{
5956
		else{
5957
		
5957
 
5958
			#設置執行不正常
5958
			#設置執行不正常
5959
			$result["status"]="false";
5959
			$result["status"]="false";
5960
 
5960
 
5961
			#設置執行錯誤
5961
			#設置執行錯誤
5962
			$result["error"][]="minWidthWidths加總不得大於100";
5962
			$result["error"][]="minWidthWidths加總不得大於100";
5963
 
5963
 
5964
			#回傳結果
5964
			#回傳結果
5965
			return $result;
5965
			return $result;
5966
		
5966
 
5967
			}#else end
5967
			}#else end
5968
		
5968
 
5969
		#first+$minsStyleVals;
5969
		#first+$minsStyleVals;
5970
		#函式說明:
5970
		#函式說明:
5971
		#將多個一維陣列串聯起來,key從0開始排序.
5971
		#將多個一維陣列串聯起來,key從0開始排序.
5972
		#回傳的結果:
5972
		#回傳的結果:
5973
		#$result["status"],"true"表執行正常,"false"代表執行不正常.
5973
		#$result["status"],"true"表執行正常,"false"代表執行不正常.
Line 5979... Line 5979...
5979
		$conf["arrays::mergeArray"]["inputArray"]=array(array(array($leftEmptyDivWidth)),$minStyleVals);
5979
		$conf["arrays::mergeArray"]["inputArray"]=array(array(array($leftEmptyDivWidth)),$minStyleVals);
5980
		#可省略的參數:
5980
		#可省略的參數:
5981
		#$conf["allowRepeat"],字串,預設為"true",允許重複的結果;若為"false"則不會出現重複的元素內容.
5981
		#$conf["allowRepeat"],字串,預設為"true",允許重複的結果;若為"false"則不會出現重複的元素內容.
5982
		#$conf["allowRepeat"]="true";
5982
		#$conf["allowRepeat"]="true";
5983
		$mergeArray=arrays::mergeArray($conf["arrays::mergeArray"]);
5983
		$mergeArray=arrays::mergeArray($conf["arrays::mergeArray"]);
5984
		unset($conf["arrays::mergeArray"]);	
5984
		unset($conf["arrays::mergeArray"]);
5985
		
5985
 
5986
		#如果合併陣列失敗
5986
		#如果合併陣列失敗
5987
		if($mergeArray["status"]==="false"){
5987
		if($mergeArray["status"]==="false"){
5988
 
5988
 
5989
			#設置執行不正常
5989
			#設置執行不正常
5990
			$result["status"]="false";
5990
			$result["status"]="false";
Line 5994... Line 5994...
5994
 
5994
 
5995
			#回傳結果
5995
			#回傳結果
5996
			return $result;
5996
			return $result;
5997
 
5997
 
5998
			}#if end
5998
			}#if end
5999
			
5999
 
6000
		#儲存合併好的陣列
6000
		#儲存合併好的陣列
6001
		$minsStyleVals=$mergeArray["content"];
6001
		$minsStyleVals=$mergeArray["content"];
6002
			
6002
 
6003
		#設置rwd的寬度與樣式
6003
		#設置rwd的寬度與樣式
6004
		#函式說明:
6004
		#函式說明:
6005
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
6005
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
6006
		#回傳結果:
6006
		#回傳結果:
6007
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
6007
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
Line 6018... Line 6018...
6018
		#conf["styleAttr"],二維陣列字串,針對每個$conf["target"]要使用的css樣式屬性陣列.
6018
		#conf["styleAttr"],二維陣列字串,針對每個$conf["target"]要使用的css樣式屬性陣列.
6019
		$conf["css::rwd"]["styleAttr"]=$minStyleAttrs;
6019
		$conf["css::rwd"]["styleAttr"]=$minStyleAttrs;
6020
		#conf["styleVal"],二維陣列字串,針對每個$conf["target"]要使用的css樣式數值陣列.
6020
		#conf["styleVal"],二維陣列字串,針對每個$conf["target"]要使用的css樣式數值陣列.
6021
		$conf["css::rwd"]["styleVal"]=$minsStyleVals;
6021
		$conf["css::rwd"]["styleVal"]=$minsStyleVals;
6022
		$rwd=css::rwd($conf["css::rwd"]);
6022
		$rwd=css::rwd($conf["css::rwd"]);
6023
		unset($conf["css::rwd"]);	
6023
		unset($conf["css::rwd"]);
6024
			
6024
 
6025
		#如果合併陣列失敗
6025
		#如果合併陣列失敗
6026
		if($rwd["status"]==="false"){
6026
		if($rwd["status"]==="false"){
6027
 
6027
 
6028
			#設置執行不正常
6028
			#設置執行不正常
6029
			$result["status"]="false";
6029
			$result["status"]="false";
Line 6032... Line 6032...
6032
			$result["error"]=$rwd;
6032
			$result["error"]=$rwd;
6033
 
6033
 
6034
			#回傳結果
6034
			#回傳結果
6035
			return $result;
6035
			return $result;
6036
 
6036
 
6037
			}#if end	
6037
			}#if end
6038
			
6038
 
6039
		#串接 css語法
6039
		#串接 css語法
6040
		$result["content"]=$result["content"].$rwd["content"];	
6040
		$result["content"]=$result["content"].$rwd["content"];
6041
						
6041
 
6042
		#初始化儲存寬度比例
6042
		#初始化儲存寬度比例
6043
		$width=0;
6043
		$width=0;
6044
		
6044
 
6045
		#加總小於 maxWidth 每個 div 項目的寬度
6045
		#加總小於 maxWidth 每個 div 項目的寬度
6046
		for($i=0;$i<count($conf["maxWidthWidths"]);$i++){
6046
		for($i=0;$i<count($conf["maxWidthWidths"]);$i++){
6047
		
6047
 
6048
			#加總寬度
6048
			#加總寬度
6049
			$width=$width+$conf["maxWidthWidths"][$i];
6049
			$width=$width+$conf["maxWidthWidths"][$i];
6050
		
6050
 
6051
			}#for end
6051
			}#for end
6052
			
6052
 
6053
		#如果小於100
6053
		#如果小於100
6054
		if($width<100){
6054
		if($width<100){
6055
		
6055
 
6056
			#取得左邊空div的vw
6056
			#取得左邊空div的vw
6057
			$leftEmptyDivWidth=((100-$width)/2)."vw";
6057
			$leftEmptyDivWidth=((100-$width)/2)."vw";
6058
		
6058
 
6059
			}#if end
6059
			}#if end
6060
			
6060
 
6061
		#反之
6061
		#反之
6062
		else{
6062
		else{
6063
		
6063
 
6064
			#設置左邊空div的vw為0vw
6064
			#設置左邊空div的vw為0vw
6065
			$leftEmptyDivWidth="0vw";
6065
			$leftEmptyDivWidth="0vw";
6066
		
6066
 
6067
			}#else end
6067
			}#else end
6068
			
6068
 
6069
		#$first+$maxStyleVals	
6069
		#$first+$maxStyleVals
6070
		#函式說明:
6070
		#函式說明:
6071
		#將多個一維陣列串聯起來,key從0開始排序.
6071
		#將多個一維陣列串聯起來,key從0開始排序.
6072
		#回傳的結果:
6072
		#回傳的結果:
6073
		#$result["status"],"true"表執行正常,"false"代表執行不正常.
6073
		#$result["status"],"true"表執行正常,"false"代表執行不正常.
6074
		#$result["error"],錯誤訊息陣列.
6074
		#$result["error"],錯誤訊息陣列.
Line 6079... Line 6079...
6079
		$conf["arrays::mergeArray"]["inputArray"]=array(array(array($leftEmptyDivWidth)),$maxStyleVals);
6079
		$conf["arrays::mergeArray"]["inputArray"]=array(array(array($leftEmptyDivWidth)),$maxStyleVals);
6080
		#可省略的參數:
6080
		#可省略的參數:
6081
		#$conf["allowRepeat"],字串,預設為"true",允許重複的結果;若為"false"則不會出現重複的元素內容.
6081
		#$conf["allowRepeat"],字串,預設為"true",允許重複的結果;若為"false"則不會出現重複的元素內容.
6082
		#$conf["allowRepeat"]="true";
6082
		#$conf["allowRepeat"]="true";
6083
		$mergeArray=arrays::mergeArray($conf["arrays::mergeArray"]);
6083
		$mergeArray=arrays::mergeArray($conf["arrays::mergeArray"]);
6084
		unset($conf["arrays::mergeArray"]);	
6084
		unset($conf["arrays::mergeArray"]);
6085
		
6085
 
6086
		#如果合併陣列失敗
6086
		#如果合併陣列失敗
6087
		if($mergeArray["status"]==="false"){
6087
		if($mergeArray["status"]==="false"){
6088
 
6088
 
6089
			#設置執行不正常
6089
			#設置執行不正常
6090
			$result["status"]="false";
6090
			$result["status"]="false";
Line 6094... Line 6094...
6094
 
6094
 
6095
			#回傳結果
6095
			#回傳結果
6096
			return $result;
6096
			return $result;
6097
 
6097
 
6098
			}#if end
6098
			}#if end
6099
			
6099
 
6100
		#儲存合併好的陣列	
6100
		#儲存合併好的陣列
6101
		$maxStyleVals=$mergeArray["content"];	
6101
		$maxStyleVals=$mergeArray["content"];
6102
			
6102
 
6103
		#設置rwd的寬度與樣式
6103
		#設置rwd的寬度與樣式
6104
		#函式說明:
6104
		#函式說明:
6105
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
6105
		#響應式css樣式,依據瀏覽器的環境(寬度,高度...),使用指定的css樣式
6106
		#回傳結果:
6106
		#回傳結果:
6107
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
6107
		#$result["status"],字串,執行否正常,"true"代表正常,"false"代表不正常.
Line 6118... Line 6118...
6118
		#conf["styleAttr"],二維陣列字串,針對每個$conf["target"]要使用的css樣式屬性陣列.
6118
		#conf["styleAttr"],二維陣列字串,針對每個$conf["target"]要使用的css樣式屬性陣列.
6119
		$conf["css::rwd"]["styleAttr"]=$maxStyleAttrs;
6119
		$conf["css::rwd"]["styleAttr"]=$maxStyleAttrs;
6120
		#conf["styleVal"],二維陣列字串,針對每個$conf["target"]要使用的css樣式數值陣列.
6120
		#conf["styleVal"],二維陣列字串,針對每個$conf["target"]要使用的css樣式數值陣列.
6121
		$conf["css::rwd"]["styleVal"]=$maxStyleVals;
6121
		$conf["css::rwd"]["styleVal"]=$maxStyleVals;
6122
		$rwd=css::rwd($conf["css::rwd"]);
6122
		$rwd=css::rwd($conf["css::rwd"]);
6123
		unset($conf["css::rwd"]);	
6123
		unset($conf["css::rwd"]);
6124
			
6124
 
6125
		#如果合併陣列失敗
6125
		#如果合併陣列失敗
6126
		if($rwd["status"]==="false"){
6126
		if($rwd["status"]==="false"){
6127
 
6127
 
6128
			#設置執行不正常
6128
			#設置執行不正常
6129
			$result["status"]="false";
6129
			$result["status"]="false";
Line 6132... Line 6132...
6132
			$result["error"]=$rwd;
6132
			$result["error"]=$rwd;
6133
 
6133
 
6134
			#回傳結果
6134
			#回傳結果
6135
			return $result;
6135
			return $result;
6136
 
6136
 
6137
			}#if end	
6137
			}#if end
6138
			
6138
 
6139
		#串接 css語法
6139
		#串接 css語法
6140
		$result["content"]=$result["content"].$rwd["content"];	
6140
		$result["content"]=$result["content"].$rwd["content"];
6141
		
6141
 
6142
		#設置執行正常
6142
		#設置執行正常
6143
		$result["status"]="true";
6143
		$result["status"]="true";
6144
		
6144
 
6145
		#回傳結果
6145
		#回傳結果
6146
		return $result;
6146
		return $result;
6147
	
6147
 
6148
		}#function rwdInlineBlock end
6148
		}#function rwdInlineBlock end
6149
 
6149
 
6150
	/*
6150
	/*
6151
	#函式說明:
6151
	#函式說明:
6152
	#建立qbpwcf專屬的css類別樣式
6152
	#建立qbpwcf專屬的css類別樣式
Line 6340... Line 6340...
6340
		#儲存css類別樣式
6340
		#儲存css類別樣式
6341
		$result["content"]=$result["content"].$createCssStyle["content"];
6341
		$result["content"]=$result["content"].$createCssStyle["content"];
6342
 
6342
 
6343
		#__defaultTextNoWrapStyle
6343
		#__defaultTextNoWrapStyle
6344
		#設置預設的不段行且過長用點點點表示的css樣式
6344
		#設置預設的不段行且過長用點點點表示的css樣式
6345
		#涵式說明: 
6345
		#涵式說明:
6346
		#創建 css 樣式
6346
		#創建 css 樣式
6347
		#回傳的結果:
6347
		#回傳的結果:
6348
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
6348
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
6349
		#$result["css"],css設定內容
6349
		#$result["css"],css設定內容
6350
		#$result["function"],當前執行的函數
6350
		#$result["function"],當前執行的函數
6351
		#$result["error"],涵式錯誤訊息,若爲""則表示沒有錯誤 
6351
		#$result["error"],涵式錯誤訊息,若爲""則表示沒有錯誤
6352
		#必填的參數:
6352
		#必填的參數:
6353
		$conf["css::createCssStyle"]["cssStyleName"]="__defaultTextNoWrapStyle";#為該 css 樣式的名稱,不能以數字開頭。
6353
		$conf["css::createCssStyle"]["cssStyleName"]="__defaultTextNoWrapStyle";#為該 css 樣式的名稱,不能以數字開頭。
6354
		$conf["css::createCssStyle"]["attributes"]=array("font-size","margin-left","margin-right","margin-top","margin-bottom","white-space","overflow","text-overflow","width");#為屬性名稱,須為陣列值
6354
		$conf["css::createCssStyle"]["attributes"]=array("font-size","margin-left","margin-right","margin-top","margin-bottom","white-space","overflow","text-overflow","width");#為屬性名稱,須為陣列值
6355
		$conf["css::createCssStyle"]["content"]=array("30px","auto","auto","auto","auto","nowrap","hidden","ellipsis","100%");#為屬性值,須為陣列值
6355
		$conf["css::createCssStyle"]["content"]=array("30px","auto","auto","auto","auto","nowrap","hidden","ellipsis","100%");#為屬性值,須為陣列值
6356
		$createCss=css::createCssStyle($conf["css::createCssStyle"]);
6356
		$createCss=css::createCssStyle($conf["css::createCssStyle"]);
6357
		unset($conf["css::createCssStyle"]);
6357
		unset($conf["css::createCssStyle"]);
6358
		
6358
 
6359
		#如果建立預設css樣式失敗
6359
		#如果建立預設css樣式失敗
6360
		if($createCss["status"]=="false"){
6360
		if($createCss["status"]=="false"){
6361
			
6361
 
6362
			#設置執行失敗識別
6362
			#設置執行失敗識別
6363
			$result["status"]="false";
6363
			$result["status"]="false";
6364
 
6364
 
6365
			#設置錯誤訊息
6365
			#設置錯誤訊息
6366
			$result["error"]=$createCss;
6366
			$result["error"]=$createCss;
6367
 
6367
 
6368
			#回傳結果
6368
			#回傳結果
6369
			return $result;
6369
			return $result;
6370
 
6370
 
6371
			}#if end
6371
			}#if end
6372
			
6372
 
6373
		#串聯css樣式
6373
		#串聯css樣式
6374
		$result["content"]=$createCss["content"].$result["content"];
6374
		$result["content"]=$createCss["content"].$result["content"];
6375
 
6375
 
6376
		#__qbpwcf_inputRadioWithBorder
6376
		#__qbpwcf_inputRadioWithBorder
6377
		#函式說明:
6377
		#函式說明:
Line 6908... Line 6908...
6908
 
6908
 
6909
			}#if end
6909
			}#if end
6910
 
6910
 
6911
		#儲存css類別樣式
6911
		#儲存css類別樣式
6912
		$result["content"]=$result["content"].$createCssStyle["content"];
6912
		$result["content"]=$result["content"].$createCssStyle["content"];
6913
		
6913
 
6914
		#函式說明:
6914
		#函式說明:
6915
		#創建 css 樣式,前面會自動加上「.」.
6915
		#創建 css 樣式,前面會自動加上「.」.
6916
		#回傳的結果:
6916
		#回傳的結果:
6917
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
6917
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
6918
		#$result["css"],css設定內容
6918
		#$result["css"],css設定內容
Line 6940... Line 6940...
6940
 
6940
 
6941
			}#if end
6941
			}#if end
6942
 
6942
 
6943
		#儲存css類別樣式
6943
		#儲存css類別樣式
6944
		$result["content"]=$result["content"].$createCssStyle["content"];
6944
		$result["content"]=$result["content"].$createCssStyle["content"];
6945
		
6945
 
6946
		#函式說明:
6946
		#函式說明:
6947
		#創建 css 樣式,前面會自動加上「.」.
6947
		#創建 css 樣式,前面會自動加上「.」.
6948
		#回傳的結果:
6948
		#回傳的結果:
6949
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
6949
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
6950
		#$result["css"],css設定內容
6950
		#$result["css"],css設定內容
Line 6972... Line 6972...
6972
 
6972
 
6973
			}#if end
6973
			}#if end
6974
 
6974
 
6975
		#儲存css類別樣式
6975
		#儲存css類別樣式
6976
		$result["content"]=$result["content"].$createCssStyle["content"];
6976
		$result["content"]=$result["content"].$createCssStyle["content"];
6977
		
6977
 
6978
		#函式說明:
6978
		#函式說明:
6979
		#創建 css 樣式,前面會自動加上「.」.
6979
		#創建 css 樣式,前面會自動加上「.」.
6980
		#回傳的結果:
6980
		#回傳的結果:
6981
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
6981
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
6982
		#$result["css"],css設定內容
6982
		#$result["css"],css設定內容
Line 7004... Line 7004...
7004
 
7004
 
7005
			}#if end
7005
			}#if end
7006
 
7006
 
7007
		#儲存css類別樣式
7007
		#儲存css類別樣式
7008
		$result["content"]=$result["content"].$createCssStyle["content"];
7008
		$result["content"]=$result["content"].$createCssStyle["content"];
7009
		
7009
 
7010
		#函式說明:
7010
		#函式說明:
7011
		#創建 css 樣式,前面會自動加上「.」.
7011
		#創建 css 樣式,前面會自動加上「.」.
7012
		#回傳的結果:
7012
		#回傳的結果:
7013
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
7013
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
7014
		#$result["css"],css設定內容
7014
		#$result["css"],css設定內容
Line 7036... Line 7036...
7036
 
7036
 
7037
			}#if end
7037
			}#if end
7038
 
7038
 
7039
		#儲存css類別樣式
7039
		#儲存css類別樣式
7040
		$result["content"]=$result["content"].$createCssStyle["content"];
7040
		$result["content"]=$result["content"].$createCssStyle["content"];
7041
		
7041
 
7042
		#函式說明:
7042
		#函式說明:
7043
		#創建 css 樣式,前面會自動加上「.」.
7043
		#創建 css 樣式,前面會自動加上「.」.
7044
		#回傳的結果:
7044
		#回傳的結果:
7045
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
7045
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
7046
		#$result["css"],css設定內容
7046
		#$result["css"],css設定內容
Line 7100... Line 7100...
7100
 
7100
 
7101
			}#if end
7101
			}#if end
7102
 
7102
 
7103
		#儲存css類別樣式
7103
		#儲存css類別樣式
7104
		$result["content"]=$result["content"].$createCssStyle["content"];
7104
		$result["content"]=$result["content"].$createCssStyle["content"];
7105
		
7105
 
7106
		#函式說明:
7106
		#函式說明:
7107
		#創建針對html標籤的立即css樣式或限定套用類型的css樣式.
7107
		#創建針對html標籤的立即css樣式或限定套用類型的css樣式.
7108
		#回傳的結果:
7108
		#回傳的結果:
7109
		#$result["status"],執行是否正常,"true"代表正常;"false"代表不正常.
7109
		#$result["status"],執行是否正常,"true"代表正常;"false"代表不正常.
7110
		#$result["error"],涵式錯誤訊息陣列
7110
		#$result["error"],涵式錯誤訊息陣列
Line 7135... Line 7135...
7135
 
7135
 
7136
			}#if end
7136
			}#if end
7137
 
7137
 
7138
		#儲存css類別樣式
7138
		#儲存css類別樣式
7139
		$result["content"]=$result["content"].$createApplyCssStyle["content"];
7139
		$result["content"]=$result["content"].$createApplyCssStyle["content"];
7140
		
7140
 
7141
		#函式說明:
7141
		#函式說明:
7142
		#創建針對html標籤的立即css樣式或限定套用類型的css樣式.
7142
		#創建針對html標籤的立即css樣式或限定套用類型的css樣式.
7143
		#回傳的結果:
7143
		#回傳的結果:
7144
		#$result["status"],執行是否正常,"true"代表正常;"false"代表不正常.
7144
		#$result["status"],執行是否正常,"true"代表正常;"false"代表不正常.
7145
		#$result["error"],涵式錯誤訊息陣列
7145
		#$result["error"],涵式錯誤訊息陣列
Line 7213... Line 7213...
7213
 
7213
 
7214
		#回傳結果
7214
		#回傳結果
7215
		return $result;
7215
		return $result;
7216
 
7216
 
7217
		}#function qbpwcfStyle end
7217
		}#function qbpwcfStyle end
7218
		
7218
 
7219
	/*
7219
	/*
7220
	#函式說明:
7220
	#函式說明:
7221
	#建立bootstap樣式的hr
7221
	#建立bootstap樣式的hr
7222
	#回傳結果:
7222
	#回傳結果:
7223
	#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
7223
	#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
Line 7235... Line 7235...
7235
	#無.
7235
	#無.
7236
	#備註:
7236
	#備註:
7237
	#無.
7237
	#無.
7238
	*/
7238
	*/
7239
	public static function hr(&$conf=array()){
7239
	public static function hr(&$conf=array()){
7240
	
7240
 
7241
		#初始化要回傳的結果
7241
		#初始化要回傳的結果
7242
		$result=array();
7242
		$result=array();
7243
 
7243
 
7244
		#取得當前執行的函數名稱
7244
		#取得當前執行的函數名稱
7245
		$result["function"]=__FUNCTION__;
7245
		$result["function"]=__FUNCTION__;
Line 7349... Line 7349...
7349
 
7349
 
7350
			#回傳結果
7350
			#回傳結果
7351
			return $result;
7351
			return $result;
7352
 
7352
 
7353
			}#if end
7353
			}#if end
7354
		
7354
 
7355
		#如果要透明
7355
		#如果要透明
7356
		if($conf["opacity"]==="true"){
7356
		if($conf["opacity"]==="true"){
7357
		
7357
 
7358
			#設置為 0.0
7358
			#設置為 0.0
7359
			$conf["opacity"]="0.0";
7359
			$conf["opacity"]="0.0";
7360
		
7360
 
7361
			}#if end
7361
			}#if end
7362
		
7362
 
7363
		#反之	
7363
		#反之
7364
		else{
7364
		else{
7365
			#設置為 1.0
7365
			#設置為 1.0
7366
			$conf["opacity"]="1.0";
7366
			$conf["opacity"]="1.0";
7367
			
7367
 
7368
			}#else end
7368
			}#else end
7369
	
7369
 
7370
		#hr html 語法
7370
		#hr html 語法
7371
		$result["content"]="<hr class='__qbpwcf_hr' style='color:".$conf["color"].";opacity:".$conf["opacity"]."' >";
7371
		$result["content"]="<hr class='__qbpwcf_hr' style='color:".$conf["color"].";opacity:".$conf["opacity"]."' >";
7372
	
7372
 
7373
		#設置執行正常 
7373
		#設置執行正常
7374
		$result["status"]="true";
7374
		$result["status"]="true";
7375
	
7375
 
7376
		#回傳結果
7376
		#回傳結果
7377
		return $result;
7377
		return $result;
7378
	
7378
 
7379
		}#function hr end	
7379
		}#function hr end
7380
		
7380
 
7381
	/*
7381
	/*
7382
	#函式說明:
7382
	#函式說明:
7383
	#建立div的frame
7383
	#建立div的frame
7384
	#回傳結果:
7384
	#回傳結果:
7385
	#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
7385
	#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
Line 7403... Line 7403...
7403
	#無.
7403
	#無.
7404
	#備註:
7404
	#備註:
7405
	#無.
7405
	#無.
7406
	*/
7406
	*/
7407
	public static function frame(&$conf=array()){
7407
	public static function frame(&$conf=array()){
7408
	
7408
 
7409
		#初始化要回傳的結果
7409
		#初始化要回傳的結果
7410
		$result=array();
7410
		$result=array();
7411
 
7411
 
7412
		#取得當前執行的函數名稱
7412
		#取得當前執行的函數名稱
7413
		$result["function"]=__FUNCTION__;
7413
		$result["function"]=__FUNCTION__;
Line 7517... Line 7517...
7517
 
7517
 
7518
			#回傳結果
7518
			#回傳結果
7519
			return $result;
7519
			return $result;
7520
 
7520
 
7521
			}#if end
7521
			}#if end
7522
	
7522
 
7523
		#函式說明:
7523
		#函式說明:
7524
		#將要執行的script語法透過該函式執行(會在程式外層用<script></script>包起來).
7524
		#將要執行的script語法透過該函式執行(會在程式外層用<script></script>包起來).
7525
		#回傳結果:
7525
		#回傳結果:
7526
		#$result["status"],執行是否正常,"true"為正常,"false"為不正常.
7526
		#$result["status"],執行是否正常,"true"為正常,"false"為不正常.
7527
		#$result["error"],錯誤訊息陣列
7527
		#$result["error"],錯誤訊息陣列
Line 7531... Line 7531...
7531
		#$conf["script"],字串,要執行的javaScript語法.
7531
		#$conf["script"],字串,要執行的javaScript語法.
7532
		$conf["javaScript::toScript"]["script"]=
7532
		$conf["javaScript::toScript"]["script"]=
7533
		"
7533
		"
7534
			//若變數不存在
7534
			//若變數不存在
7535
			if(window.qbpwcf===undefined){
7535
			if(window.qbpwcf===undefined){
7536
				
7536
 
7537
				//初始化為空物件
7537
				//初始化為空物件
7538
				window.qbpwcf={};
7538
				window.qbpwcf={};
7539
			
7539
 
7540
				}//if end
7540
				}//if end
7541
				
7541
 
7542
			//若變數不存在
7542
			//若變數不存在
7543
			if(window.qbpwcf.css===undefined){
7543
			if(window.qbpwcf.css===undefined){
7544
			
7544
 
7545
				//初始化為空物件
7545
				//初始化為空物件
7546
				window.qbpwcf.css={};
7546
				window.qbpwcf.css={};
7547
			
7547
 
7548
				}//if end
7548
				}//if end
7549
				
7549
 
7550
			//若變數不存在
7550
			//若變數不存在
7551
			if(window.qbpwcf.css.frame===undefined){
7551
			if(window.qbpwcf.css.frame===undefined){
7552
			
7552
 
7553
				//初始化為空物件
7553
				//初始化為空物件
7554
				window.qbpwcf.css.frame={};
7554
				window.qbpwcf.css.frame={};
7555
				
7555
 
7556
				}//if end
7556
				}//if end
7557
				
7557
 
7558
			//初始化儲存 div frame 物件
7558
			//初始化儲存 div frame 物件
7559
			window.qbpwcf.css.frame.content={};
7559
			window.qbpwcf.css.frame.content={};
7560
			
7560
 
7561
			//建立 div
7561
			//建立 div
7562
			divFrame=document.createElement('div');
7562
			divFrame=document.createElement('div');
7563
			
7563
 
7564
			//設置 frame 的高度
7564
			//設置 frame 的高度
7565
			divFrame.style.height='".$conf["vh%"]."vh';
7565
			divFrame.style.height='".$conf["vh%"]."vh';
7566
			divFrame.style.overflowY='auto';
7566
			divFrame.style.overflowY='auto';
7567
			divFrame.style.overflowX='hidden';
7567
			divFrame.style.overflowX='hidden';
7568
						
7568
 
7569
			//取得要放置於 iframe 上方的標題
7569
			//取得要放置於 iframe 上方的標題
7570
			title=document.getElementById('".$conf["titleId"]."');
7570
			title=document.getElementById('".$conf["titleId"]."');
7571
			
7571
 
7572
			//複製一份
7572
			//複製一份
7573
			fakeTitle=title.cloneNode(true);
7573
			fakeTitle=title.cloneNode(true);
7574
			
7574
 
7575
			//隱藏資料表的抬頭
7575
			//隱藏資料表的抬頭
7576
			title.style.opacity=0.0;
7576
			title.style.opacity=0.0;
7577
			
7577
 
7578
			//原始標題的樣式
7578
			//原始標題的樣式
7579
			titleComStyle=getComputedStyle(title.children[0].children[0]);
7579
			titleComStyle=getComputedStyle(title.children[0].children[0]);
7580
			
7580
 
7581
			//標題要放在相位置距離高度有 -XXpx的地方
7581
			//標題要放在相位置距離高度有 -XXpx的地方
7582
			titleTop=parseInt(titleComStyle.height)+parseInt(titleComStyle.borderTopWidth)+parseInt(titleComStyle.borderBottomWidth)+parseInt(titleComStyle.paddingTop)+parseInt(titleComStyle.paddingBottom);
7582
			titleTop=parseInt(titleComStyle.height)+parseInt(titleComStyle.borderTopWidth)+parseInt(titleComStyle.borderBottomWidth)+parseInt(titleComStyle.paddingTop)+parseInt(titleComStyle.paddingBottom);
7583
						
7583
 
7584
			//標題要放在相位置距離左邊有 -XXpx的地方
7584
			//標題要放在相位置距離左邊有 -XXpx的地方
7585
			titleLeft=parseInt(titleComStyle.borderLeftWidth);
7585
			titleLeft=parseInt(titleComStyle.borderLeftWidth);
7586
			
7586
 
7587
			//設置假的title樣式,像是真的表格 title
7587
			//設置假的title樣式,像是真的表格 title
7588
			fakeTitle.style.position='relative';
7588
			fakeTitle.style.position='relative';
7589
			fakeTitle.style.top=titleTop+'px';
7589
			fakeTitle.style.top=titleTop+'px';
7590
			fakeTitle.style.left=titleLeft+'px';
7590
			fakeTitle.style.left=titleLeft+'px';
7591
			fakeTitle.style.backgroundColor='".$conf["titleBgColor"]."';
7591
			fakeTitle.style.backgroundColor='".$conf["titleBgColor"]."';
7592
			
7592
 
7593
			//儲存要放置的 divFrameTitle
7593
			//儲存要放置的 divFrameTitle
7594
			window.qbpwcf.css.frame.title=fakeTitle;
7594
			window.qbpwcf.css.frame.title=fakeTitle;
7595
			
7595
 
7596
			//取得要放入 iframe 的內容
7596
			//取得要放入 iframe 的內容
7597
			container=document.getElementById('".$conf["containerId"]."');
7597
			container=document.getElementById('".$conf["containerId"]."');
7598
			
7598
 
7599
			//放置 container 到 divFrame 裡面
7599
			//放置 container 到 divFrame 裡面
7600
			divFrame.appendChild(container);
7600
			divFrame.appendChild(container);
7601
			
7601
 
7602
			//取得要放置 divFrame 地方, divFrame 會 appendChild 該元素
7602
			//取得要放置 divFrame 地方, divFrame 會 appendChild 該元素
7603
			placeHolder=document.getElementById('".$conf["placeHolderId"]."');
7603
			placeHolder=document.getElementById('".$conf["placeHolderId"]."');
7604
				
7604
 
7605
			//如果隱藏的資料表抬頭為 <thead>
7605
			//如果隱藏的資料表抬頭為 <thead>
7606
			if(title.tagName==='THEAD'){
7606
			if(title.tagName==='THEAD'){
7607
			
7607
 
7608
				//如果不是 Firefox 瀏覽器
7608
				//如果不是 Firefox 瀏覽器
7609
				if(navigator.userAgent.includes('Firefox')===false){
7609
				if(navigator.userAgent.includes('Firefox')===false){
7610
				
7610
 
7611
					//砍掉之
7611
					//砍掉之
7612
					title.remove();
7612
					title.remove();
7613
				
7613
 
7614
					}//if end
7614
					}//if end
7615
			
7615
 
7616
				}//if end	
7616
				}//if end
7617
						
7617
 
7618
			//儲存要放置的 divFrame
7618
			//儲存要放置的 divFrame
7619
			window.qbpwcf.css.frame.content=divFrame;			
7619
			window.qbpwcf.css.frame.content=divFrame;
7620
			
7620
 
7621
			//儲存放置 divFame 的動作
7621
			//儲存放置 divFame 的動作
7622
			window.qbpwcf.css.frame.print=function(){
7622
			window.qbpwcf.css.frame.print=function(){
7623
			
7623
 
7624
				//放置標題到 placeHolder
7624
				//放置標題到 placeHolder
7625
				placeHolder.appendChild(window.qbpwcf.css.frame.title);
7625
				placeHolder.appendChild(window.qbpwcf.css.frame.title);
7626
			
7626
 
7627
				//放置divFrame到placeHolder的動作
7627
				//放置divFrame到placeHolder的動作
7628
				placeHolder.appendChild(window.qbpwcf.css.frame.content);
7628
				placeHolder.appendChild(window.qbpwcf.css.frame.content);
7629
			
7629
 
7630
				}//functino end
7630
				}//functino end
7631
			
7631
 
7632
		";
7632
		";
7633
		#可省略參數:
7633
		#可省略參數:
7634
		#$conf["onReady"],字串,是否要在網頁完全載入後再執行,"false"為不等載入完就先執行,預設為"true"要等載入完再執行.
7634
		#$conf["onReady"],字串,是否要在網頁完全載入後再執行,"false"為不等載入完就先執行,預設為"true"要等載入完再執行.
7635
		#$conf["onReady"]="true";
7635
		#$conf["onReady"]="true";
7636
		#$conf["globalJs"],字串陣列,為要放入<script>標籤的js全域變數.
7636
		#$conf["globalJs"],字串陣列,為要放入<script>標籤的js全域變數.
Line 7639... Line 7639...
7639
		#$conf["jsFunciton"]=array();
7639
		#$conf["jsFunciton"]=array();
7640
		#參考資料:
7640
		#參考資料:
7641
		#http://stackoverflow.com/questions/9899372/pure-javascript-equivalent-to-jquerys-ready-how-to-call-a-function-when-the
7641
		#http://stackoverflow.com/questions/9899372/pure-javascript-equivalent-to-jquerys-ready-how-to-call-a-function-when-the
7642
		$toScript=javaScript::toScript($conf["javaScript::toScript"]);
7642
		$toScript=javaScript::toScript($conf["javaScript::toScript"]);
7643
		unset($conf["javaScript::toScript"]);
7643
		unset($conf["javaScript::toScript"]);
7644
	
7644
 
7645
		#如果執行失敗
7645
		#如果執行失敗
7646
		if($toScript["status"]==="false"){
7646
		if($toScript["status"]==="false"){
7647
		
7647
 
7648
			#設置執行失敗
7648
			#設置執行失敗
7649
			$result["status"]="false";
7649
			$result["status"]="false";
7650
			
7650
 
7651
			#設置執行錯誤
7651
			#設置執行錯誤
7652
			$result["error"]=$toScript;
7652
			$result["error"]=$toScript;
7653
		
7653
 
7654
			#回傳結果
7654
			#回傳結果
7655
			return $result;
7655
			return $result;
7656
		
7656
 
7657
			}#if end
7657
			}#if end
7658
			
7658
 
7659
		#取得js的內容
7659
		#取得js的內容
7660
		$result["content"]=$toScript["content"];
7660
		$result["content"]=$toScript["content"];
7661
		
7661
 
7662
		#設置執行正常
7662
		#設置執行正常
7663
		$result["status"]="true";
7663
		$result["status"]="true";
7664
		
7664
 
7665
		#回傳結果
7665
		#回傳結果
7666
		return $result;
7666
		return $result;
7667
		
7667
 
7668
		}#function frame end
7668
		}#function frame end
7669
		
7669
 
7670
	/*
7670
	/*
7671
	#函式說明:
7671
	#函式說明:
7672
	#建立不會重複的class名稱.
7672
	#建立不會重複的class名稱.
7673
	#回傳結果:
7673
	#回傳結果:
7674
	#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
7674
	#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
Line 7683... Line 7683...
7683
	#無.
7683
	#無.
7684
	#備註:
7684
	#備註:
7685
	#無.
7685
	#無.
7686
	*/
7686
	*/
7687
	public static function uuidClassName(){
7687
	public static function uuidClassName(){
7688
	
7688
 
7689
		#初始化要回傳的結果
7689
		#初始化要回傳的結果
7690
		$result=array();
7690
		$result=array();
7691
 
7691
 
7692
		#取得當前執行的函數名稱
7692
		#取得當前執行的函數名稱
7693
		$result["function"]=__FUNCTION__;
7693
		$result["function"]=__FUNCTION__;
7694
	
7694
 
7695
		#函式說明:
7695
		#函式說明:
7696
		#使用 linux 的 uuid 指令來產生 uuid 字串
7696
		#使用 linux 的 uuid 指令來產生 uuid 字串
7697
		#回傳結果:
7697
		#回傳結果:
7698
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
7698
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
7699
		#$result["error"],錯誤訊息.
7699
		#$result["error"],錯誤訊息.
Line 7705... Line 7705...
7705
		#參考資料:
7705
		#參考資料:
7706
		#無.
7706
		#無.
7707
		#備註:
7707
		#備註:
7708
		#無.
7708
		#無.
7709
		$uuid=cmd::uuid();
7709
		$uuid=cmd::uuid();
7710
		
7710
 
7711
		#如果執行失敗
7711
		#如果執行失敗
7712
		if($uuid["status"]==="false"){
7712
		if($uuid["status"]==="false"){
7713
		
7713
 
7714
			#設置執行失敗
7714
			#設置執行失敗
7715
			$result["status"]="false";
7715
			$result["status"]="false";
7716
			
7716
 
7717
			#設置執行錯誤
7717
			#設置執行錯誤
7718
			$result["error"]=$uuid;
7718
			$result["error"]=$uuid;
7719
		
7719
 
7720
			#回傳結果
7720
			#回傳結果
7721
			return $result;
7721
			return $result;
7722
		
7722
 
7723
			}#if end
7723
			}#if end
7724
		
7724
 
7725
		#函式說明:
7725
		#函式說明:
7726
		#處理字串避免網頁出錯
7726
		#處理字串避免網頁出錯
7727
		#回傳結果:
7727
		#回傳結果:
7728
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
7728
		#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
7729
		#$result["function"],當前執行的函數.
7729
		#$result["function"],當前執行的函數.
7730
		#$result["content"],爲處理好的字串.
7730
		#$result["content"],爲處理好的字串.
7731
		#$result["error"],錯誤訊息陣列.
7731
		#$result["error"],錯誤訊息陣列.
7732
		#$result["argu"],使用的參數. 
7732
		#$result["argu"],使用的參數.
7733
		#必填參數:
7733
		#必填參數:
7734
		#$conf["stringIn"],字串,爲要處理的字串
7734
		#$conf["stringIn"],字串,爲要處理的字串
7735
		$conf["stringProcess::correctCharacter"]["stringIn"]=$uuid["content"];
7735
		$conf["stringProcess::correctCharacter"]["stringIn"]=$uuid["content"];
7736
		#可省略參數:
7736
		#可省略參數:
7737
		#$conf["selectedCharacter"],字串陣列,爲被選擇要處理的字串/字元,須爲陣列值。若不設定則預設爲要將這些字串作替換 ("<",">","=","//","'","$","%","&","|","/*","*","#","\"").特殊字元,「\n」代表換行,「\t」代表tab鍵的間隔
7737
		#$conf["selectedCharacter"],字串陣列,爲被選擇要處理的字串/字元,須爲陣列值。若不設定則預設爲要將這些字串作替換 ("<",">","=","//","'","$","%","&","|","/*","*","#","\"").特殊字元,「\n」代表換行,「\t」代表tab鍵的間隔
Line 7742... Line 7742...
7742
		#無.
7742
		#無.
7743
		#備註:
7743
		#備註:
7744
		#無.
7744
		#無.
7745
		$correctCharacter=stringProcess::correctCharacter($conf["stringProcess::correctCharacter"]);
7745
		$correctCharacter=stringProcess::correctCharacter($conf["stringProcess::correctCharacter"]);
7746
		unset($conf["stringProcess::correctCharacter"]);
7746
		unset($conf["stringProcess::correctCharacter"]);
7747
		
7747
 
7748
		#如果執行失敗
7748
		#如果執行失敗
7749
		if($correctCharacter["status"]==="false"){
7749
		if($correctCharacter["status"]==="false"){
7750
		
7750
 
7751
			#設置執行失敗
7751
			#設置執行失敗
7752
			$result["status"]="false";
7752
			$result["status"]="false";
7753
			
7753
 
7754
			#設置執行錯誤
7754
			#設置執行錯誤
7755
			$result["error"]=$correctCharacter;
7755
			$result["error"]=$correctCharacter;
7756
		
7756
 
7757
			#回傳結果
7757
			#回傳結果
7758
			return $result;
7758
			return $result;
7759
		
7759
 
7760
			}#if end
7760
			}#if end
7761
		
7761
 
7762
		#設置結果
7762
		#設置結果
7763
		$result["content"]=$correctCharacter["content"];
7763
		$result["content"]=$correctCharacter["content"];
7764
	
7764
 
7765
		#設置執行正常.
7765
		#設置執行正常.
7766
		$result["status"]="true";
7766
		$result["status"]="true";
7767
		
7767
 
7768
		#回傳結果
7768
		#回傳結果
7769
		return $result;
7769
		return $result;
7770
	
7770
 
7771
		}#funcrion uuidClassName end
7771
		}#funcrion uuidClassName end
7772
 
7772
 
7773
	}#class css end
7773
	}#class css end
7774
	
7774
 
7775
/*
7775
/*
7776
 
7776
 
7777
針對特定標籤的css樣式=>http://www.w3schools.com/cssref/pr_dim_height.asp
7777
針對特定標籤的css樣式=>http://www.w3schools.com/cssref/pr_dim_height.asp
7778
 
7778
 
7779
使用class 套用 css 樣式
7779
使用class 套用 css 樣式
Line 7971... Line 7971...
7971
	animation-iteration-count: infinite;
7971
	animation-iteration-count: infinite;
7972
	animation-direction: "normal";
7972
	animation-direction: "normal";
7973
	animation-delay: 3s;
7973
	animation-delay: 3s;
7974
	animation-timing-function: linear;
7974
	animation-timing-function: linear;
7975
}
7975
}
7976
@keyframes flashing 
7976
@keyframes flashing
7977
{
7977
{
7978
	0%
7978
	0%
7979
	{
7979
	{
7980
		border-color:blue;
7980
		border-color:blue;
7981
		border-style:dashed;
7981
		border-style:dashed;