国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

712 lines
23KB

  1. <?php if(!defined('DEDEINC')) exit("Request Error!");
  2. /**
  3. * 专题视图类
  4. *
  5. * @version $Id: arc.specview.class.php 1 18:17 2010年7月7日Z tianya $
  6. * @package DedeCMS.Libraries
  7. * @copyright Copyright (c) 2007 - 2020, DesDev, Inc.
  8. * @license http://help.dedecms.com/usersguide/license.html
  9. * @link http://www.dedecms.com
  10. */
  11. require_once(DEDEINC."/typelink.class.php");
  12. require_once(DEDEINC."/channelunit.class.php");
  13. require_once(DEDEINC.'/ftp.class.php');
  14. @set_time_limit(0);
  15. /**
  16. * 专题视图类
  17. *
  18. * @package SpecView
  19. * @subpackage DedeCMS.Libraries
  20. * @link http://www.dedecms.com
  21. */
  22. class SpecView
  23. {
  24. var $dsql;
  25. var $dtp;
  26. var $dtp2;
  27. var $TypeID;
  28. var $TypeLink;
  29. var $PageNo;
  30. var $TotalPage;
  31. var $TotalResult;
  32. var $PageSize;
  33. var $ChannelUnit;
  34. var $ListType;
  35. var $TempInfos;
  36. var $Fields;
  37. var $StartTime;
  38. var $ftp;
  39. var $remoteDir;
  40. /**
  41. * php5构造函数
  42. *
  43. * @access public
  44. * @param int $starttime 开始时间
  45. * @return string
  46. */
  47. function __construct($starttime=0)
  48. {
  49. global $ftp;
  50. $this->TypeID = 0;
  51. $this->dsql = $GLOBALS['dsql'];
  52. $this->dtp = new DedeTagParse();
  53. $this->dtp->SetRefObj($this);
  54. $this->dtp->SetNameSpace("dede","{","}");
  55. $this->dtp2 = new DedeTagParse();
  56. $this->dtp2->SetNameSpace("field","[","]");
  57. $this->TypeLink = new TypeLink(0);
  58. $this->ChannelUnit = new ChannelUnit(-1);
  59. $this->ftp = &$ftp;
  60. $this->remoteDir = '';
  61. //设置一些全局参数的值
  62. foreach($GLOBALS['PubFields'] as $k=>$v)
  63. {
  64. $this->Fields[$k] = $v;
  65. }
  66. if($starttime==0)
  67. {
  68. $this->StartTime = 0;
  69. }
  70. else
  71. {
  72. $this->StartTime = GetMkTime($starttime);
  73. }
  74. $this->CountRecord();
  75. $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_spec.htm";
  76. if(!file_exists($tempfile)||!is_file($tempfile))
  77. {
  78. echo "模板文件不存在,无法解析文档!";
  79. exit();
  80. }
  81. $this->dtp->LoadTemplate($tempfile);
  82. $this->TempInfos['tags'] = $this->dtp->CTags;
  83. $this->TempInfos['source'] = $this->dtp->SourceString;
  84. $ctag = $this->dtp->GetTag("page");
  85. if(!is_object($ctag))
  86. {
  87. $this->PageSize = 20;
  88. }
  89. else
  90. {
  91. if($ctag->GetAtt("pagesize")!="")
  92. {
  93. $this->PageSize = $ctag->GetAtt("pagesize");
  94. }
  95. else
  96. {
  97. $this->PageSize = 20;
  98. }
  99. }
  100. $this->TotalPage = ceil($this->TotalResult/$this->PageSize);
  101. }
  102. //php4构造函数
  103. function SpecView($starttime=0)
  104. {
  105. $this->__construct($starttime);
  106. }
  107. //关闭相关资源
  108. function Close()
  109. {
  110. }
  111. /**
  112. * 统计列表里的记录
  113. *
  114. * @access private
  115. * @return void
  116. */
  117. function CountRecord()
  118. {
  119. $this->TotalResult = -1;
  120. if(isset($GLOBALS['TotalResult']))
  121. {
  122. $this->TotalResult = $GLOBALS['TotalResult'];
  123. }
  124. if(isset($GLOBALS['PageNo']))
  125. {
  126. $this->PageNo = $GLOBALS['PageNo'];
  127. }
  128. else
  129. {
  130. $this->PageNo = 1;
  131. }
  132. if($this->TotalResult==-1)
  133. {
  134. if($this->StartTime>0)
  135. {
  136. $timesql = " AND #@__archives.senddate>'".$this->StartTime."'";
  137. }
  138. else
  139. {
  140. $timesql = "";
  141. }
  142. $row = $this->dsql->GetOne("SELECT count(*) AS dd FROM #@__archives WHERE #@__archives.arcrank > -1 AND channel=-1 $timesql");
  143. if(is_array($row))
  144. {
  145. $this->TotalResult = $row['dd'];
  146. }
  147. else
  148. {
  149. $this->TotalResult = 0;
  150. }
  151. }
  152. }
  153. /**
  154. * 显示列表
  155. *
  156. * @access public
  157. * @return void
  158. */
  159. function Display()
  160. {
  161. if($this->TypeLink->TypeInfos['ispart']==1
  162. ||$this->TypeLink->TypeInfos['ispart']==2)
  163. {
  164. $this->DisplayPartTemplets();
  165. }
  166. $this->ParseTempletsFirst();
  167. foreach($this->dtp->CTags as $tagid=>$ctag)
  168. {
  169. if($ctag->GetName()=="list")
  170. {
  171. $limitstart = ($this->PageNo-1) * $this->PageSize;
  172. $row = $this->PageSize;
  173. if(trim($ctag->GetInnerText())=="")
  174. {
  175. $InnerText = GetSysTemplets("list_fulllist.htm");
  176. }
  177. else
  178. {
  179. $InnerText = trim($ctag->GetInnerText());
  180. }
  181. $this->dtp->Assign($tagid,
  182. $this->GetArcList($limitstart,$row,
  183. $ctag->GetAtt("col"),
  184. $ctag->GetAtt("titlelen"),
  185. $ctag->GetAtt("infolen"),
  186. $ctag->GetAtt("imgwidth"),
  187. $ctag->GetAtt("imgheight"),
  188. $ctag->GetAtt("listtype"),
  189. $ctag->GetAtt("orderby"),
  190. $InnerText,
  191. $ctag->GetAtt("tablewidth"))
  192. );
  193. }
  194. else if($ctag->GetName()=="pagelist")
  195. {
  196. $list_len = trim($ctag->GetAtt("listsize"));
  197. if($list_len=="")
  198. {
  199. $list_len = 3;
  200. }
  201. $this->dtp->Assign($tagid,$this->GetPageListDM($list_len));
  202. }
  203. }
  204. $this->dtp->Display();
  205. }
  206. /**
  207. * 开始创建列表
  208. *
  209. * @access public
  210. * @param int $isremote 是否远程
  211. * @return string
  212. */
  213. function MakeHtml($isremote=0)
  214. {
  215. global $cfg_remote_site;
  216. //初步给固定值的标记赋值
  217. $this->ParseTempletsFirst();
  218. $totalpage = ceil($this->TotalResult / $this->PageSize);
  219. if($totalpage==0)
  220. {
  221. $totalpage = 1;
  222. }
  223. CreateDir($GLOBALS['cfg_special']);
  224. $murl = "";
  225. for($this->PageNo=1;$this->PageNo<=$totalpage;$this->PageNo++)
  226. {
  227. foreach($this->dtp->CTags as $tagid=>$ctag)
  228. {
  229. if($ctag->GetName()=="list")
  230. {
  231. $limitstart = ($this->PageNo-1) * $this->PageSize;
  232. $row = $this->PageSize;
  233. if(trim($ctag->GetInnerText())=="")
  234. {
  235. $InnerText = GetSysTemplets("spec_list.htm");
  236. }
  237. else
  238. {
  239. $InnerText = trim($ctag->GetInnerText());
  240. }
  241. $this->dtp->Assign($tagid,
  242. $this->GetArcList($limitstart,$row,
  243. $ctag->GetAtt("col"),
  244. $ctag->GetAtt("titlelen"),
  245. $ctag->GetAtt("infolen"),
  246. $ctag->GetAtt("imgwidth"),
  247. $ctag->GetAtt("imgheight"),
  248. "spec",
  249. $ctag->GetAtt("orderby"),
  250. $InnerText,
  251. $ctag->GetAtt("tablewidth"))
  252. );
  253. }
  254. else if($ctag->GetName()=="pagelist")
  255. {
  256. $list_len = trim($ctag->GetAtt("listsize"));
  257. if($list_len=="")
  258. {
  259. $list_len = 3;
  260. }
  261. $this->dtp->Assign($tagid,$this->GetPageListST($list_len));
  262. }
  263. }//End foreach
  264. $makeFile = $GLOBALS['cfg_special']."/spec_".$this->PageNo.$GLOBALS['art_shortname'];
  265. $murl = $makeFile;
  266. $makeFile = $GLOBALS['cfg_basedir'].$makeFile;
  267. $this->dtp->SaveTo($makeFile);
  268. //如果启用远程站点则上传
  269. if($cfg_remote_site=='Y'&& $isremote == 1)
  270. {
  271. //分析远程文件路径
  272. $remotefile = str_replace(DEDEROOT, '', $makeFile);
  273. $localfile = '..'.$remotefile;
  274. $remotedir = preg_replace('/[^\/]*\.html/', '',$remotefile);
  275. //不相等则说明已经切换目录则可以创建镜像
  276. $this->ftp->rmkdir($remotedir);
  277. $this->ftp->upload($localfile, $remotefile, 'acii');
  278. }
  279. echo "成功创建:$murl<br/>";
  280. }
  281. copy($GLOBALS['cfg_basedir'].$GLOBALS['cfg_special']."/spec_1".$GLOBALS['art_shortname'],$GLOBALS['cfg_basedir'].$GLOBALS['cfg_special']."/index.html");
  282. $murl = $GLOBALS['cfg_special']."/index.html";
  283. return $murl;
  284. }
  285. /**
  286. * 解析模板,对固定的标记进行初始给值
  287. *
  288. * @access private
  289. * @return void
  290. */
  291. function ParseTempletsFirst()
  292. {
  293. MakeOneTag($this->dtp,$this);
  294. }
  295. /**
  296. * 获取内容列表
  297. *
  298. * @access public
  299. * @param int $limitstart 限制开始
  300. * @param int $row 行数
  301. * @param int $col 列数
  302. * @param int $titlelen 标题长度
  303. * @param int $infolen 描述长度
  304. * @param int $imgwidth 图片宽度
  305. * @param int $imgheight 图片高度
  306. * @param string $listtype 列表类型
  307. * @param string $orderby 排列顺序
  308. * @param string $innertext 底层模板
  309. * @param string $tablewidth 表格宽度
  310. * @return string
  311. */
  312. function GetArcList($limitstart=0,$row=10,$col=1,$titlelen=30,$infolen=250,
  313. $imgwidth=120,$imgheight=90,$listtype="all",$orderby="default",$innertext="",$tablewidth="100")
  314. {
  315. $typeid=$this->TypeID;
  316. if($row=="")
  317. {
  318. $row = 10;
  319. }
  320. if($limitstart=="")
  321. {
  322. $limitstart = 0;
  323. }
  324. if($titlelen=="")
  325. {
  326. $titlelen = 30;
  327. }
  328. if($infolen=="")
  329. {
  330. $infolen = 250;
  331. }
  332. if($imgwidth=="")
  333. {
  334. $imgwidth = 120;
  335. }
  336. if($imgheight=="")
  337. {
  338. $imgheight = 120;
  339. }
  340. if($listtype=="")
  341. {
  342. $listtype = "all";
  343. }
  344. if($orderby=="")
  345. {
  346. $orderby="default";
  347. }
  348. else
  349. {
  350. $orderby=strtolower($orderby);
  351. }
  352. $tablewidth = str_replace("%", "", $tablewidth);
  353. if($tablewidth=="")
  354. {
  355. $tablewidth=100;
  356. }
  357. if($col=="")
  358. {
  359. $col=1;
  360. }
  361. $colWidth = ceil(100/$col);
  362. $tablewidth = $tablewidth."%";
  363. $colWidth = $colWidth."%";
  364. $innertext = trim($innertext);
  365. if($innertext=="")
  366. {
  367. $innertext = GetSysTemplets("spec_list.htm");
  368. }
  369. //按不同情况设定SQL条件
  370. $orwhere = " arc.arcrank > -1 AND arc.channel = -1 ";
  371. if($this->StartTime>0)
  372. {
  373. $orwhere .= " AND arc.senddate>'".$this->StartTime."'";
  374. }
  375. //排序方式
  376. $ordersql = '';
  377. if($orderby=='senddate')
  378. {
  379. $ordersql=" ORDER BY arc.senddate desc";
  380. }
  381. else if($orderby=='pubdate')
  382. {
  383. $ordersql=" ORDER BY arc.pubdate desc";
  384. }
  385. else if($orderby=='id')
  386. {
  387. $ordersql=" ORDER BY arc.id desc";
  388. }
  389. else
  390. {
  391. $ordersql=" ORDER BY arc.sortrank desc";
  392. }
  393. $query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,arc.money,
  394. tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
  395. FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
  396. WHERE $orwhere $ordersql LIMIT $limitstart,$row ";
  397. $this->dsql->SetQuery($query);
  398. $this->dsql->Execute('al');
  399. $artlist = '';
  400. if($col>1)
  401. {
  402. $artlist = "<table width='$tablewidth' border='0' cellspacing='0' cellpadding='0'>\r\n";
  403. }
  404. $this->dtp2->LoadSource($innertext);
  405. for($i=0;$i<$row;$i++)
  406. {
  407. if($col>1)
  408. {
  409. $artlist .= "<tr>\r\n";
  410. }
  411. for($j=0;$j<$col;$j++)
  412. {
  413. if($col>1)
  414. {
  415. $artlist .= "<td width='$colWidth'>\r\n";
  416. }
  417. if($row = $this->dsql->GetArray("al"))
  418. {
  419. //处理一些特殊字段
  420. $row["description"] = cn_substr($row["description"],$infolen);
  421. $row["title"] = cn_substr($row["title"],$titlelen);
  422. $row["id"] = $row["id"];
  423. if($row['litpic'] == '-' || $row['litpic'] == '')
  424. {
  425. $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.gif';
  426. }
  427. if(!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y')
  428. {
  429. $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
  430. }
  431. $row['picname'] = $row['litpic'];
  432. $row["arcurl"] = GetFileUrl($row["id"],$row["typeid"],$row["senddate"],$row["title"],
  433. $row["ismake"],$row["arcrank"],$row["namerule"],$row["typedir"],$row["money"],$row['filename'],$row["moresite"],$row["siteurl"],$row["sitepath"]);
  434. $row["typeurl"] = GetTypeUrl($row["typeid"],$row["typedir"],$row["isdefault"],$row["defaultname"],$row["ispart"],$row["namerule2"],$row["moresite"],$row["siteurl"],$row["sitepath"]);
  435. $row["info"] = $row["description"];
  436. $row["filename"] = $row["arcurl"];
  437. $row["stime"] = GetDateMK($row["pubdate"]);
  438. $row["textlink"] = "<a href='".$row["filename"]."'>".$row["title"]."</a>";
  439. $row["typelink"] = "[<a href='".$row["typeurl"]."'>".$row["typename"]."</a>]";
  440. $row["imglink"] = "<a href='".$row["filename"]."'><img src='".$row["picname"]."' border='0' width='$imgwidth' height='$imgheight'></a>";
  441. $row["image"] = "<img src='".$row["picname"]."' border='0' width='$imgwidth' height='$imgheight'>";
  442. $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl'];
  443. $row['memberurl'] = $GLOBALS['cfg_memberurl'];
  444. $row['templeturl'] = $GLOBALS['cfg_templeturl'];
  445. //编译附加表里的数据
  446. foreach($this->ChannelUnit->ChannelFields as $k=>$arr)
  447. {
  448. if(isset($row[$k]))
  449. {
  450. $row[$k] = $this->ChannelUnit->MakeField($k,$row[$k]);
  451. }
  452. }
  453. if(is_array($this->dtp2->CTags))
  454. {
  455. foreach($this->dtp2->CTags as $k=>$ctag)
  456. {
  457. if($ctag->GetName()=='array')
  458. {
  459. //传递整个数组,在runphp模式中有特殊作用
  460. $this->dtp2->Assign($k,$row);
  461. }
  462. else
  463. {
  464. if(isset($row[$ctag->GetName()]))
  465. {
  466. $this->dtp2->Assign($k,$row[$ctag->GetName()]);
  467. }
  468. else
  469. {
  470. $this->dtp2->Assign($k,'');
  471. }
  472. }
  473. }
  474. }
  475. $artlist .= $this->dtp2->GetResult();
  476. }//if hasRow
  477. else
  478. {
  479. $artlist .= "";
  480. }
  481. if($col>1)
  482. {
  483. $artlist .= "</td>\r\n";
  484. }
  485. }//Loop Col
  486. if($col>1)
  487. {
  488. $artlist .= "</tr>\r\n";
  489. }
  490. }//Loop Line
  491. if($col>1)
  492. {
  493. $artlist .= "</table>\r\n";
  494. }
  495. $this->dsql->FreeResult("al");
  496. return $artlist;
  497. }
  498. /**
  499. * 获取静态的分页列表
  500. *
  501. * @access public
  502. * @param int $list_len 列表宽度
  503. * @return string
  504. */
  505. function GetPageListST($list_len)
  506. {
  507. $prepage="";
  508. $nextpage="";
  509. $prepagenum = $this->PageNo - 1;
  510. $nextpagenum = $this->PageNo + 1;
  511. if($list_len=="" || preg_match("/[^0-9]/", $list_len))
  512. {
  513. $list_len=3;
  514. }
  515. $totalpage = ceil($this->TotalResult / $this->PageSize);
  516. if($totalpage <= 1 && $this->TotalResult > 0)
  517. {
  518. return "<span class=\"pageinfo\">共 <strong>1</strong>页<strong>".$this->TotalResult."</strong>条记录</span>";
  519. }
  520. if($this->TotalResult == 0)
  521. {
  522. return "<span class=\"pageinfo\">共 <strong>0</strong>页<strong>".$this->TotalResult."</strong>条记录</span>";
  523. }
  524. $purl = $this->GetCurUrl();
  525. $tnamerule = "spec_";
  526. //获得上一页和下一页的链接
  527. if($this->PageNo != 1)
  528. {
  529. $prepage.="<li><a href='".$tnamerule."$prepagenum".$GLOBALS['art_shortname']."'>上一页</a></li>\r\n";
  530. $indexpage="<li><a href='".$tnamerule."1".$GLOBALS['art_shortname']."'>首页</a></li>\r\n";
  531. }
  532. else
  533. {
  534. $indexpage="<li><a>首页</a></li>\r\n";
  535. }
  536. if($this->PageNo!=$totalpage && $totalpage>1)
  537. {
  538. $nextpage.="<li><a href='".$tnamerule."$nextpagenum".$GLOBALS['art_shortname']."'>下一页</a></li>\r\n";
  539. $endpage="<li><a href='".$tnamerule."$totalpage".$GLOBALS['art_shortname']."'>末页</a></li>\r\n";
  540. }
  541. else
  542. {
  543. $endpage="<li><a>末页</a></li>\r\n";
  544. }
  545. //获得数字链接
  546. $listdd="";
  547. $total_list = $list_len * 2 + 1;
  548. if($this->PageNo >= $total_list)
  549. {
  550. $j = $this->PageNo - $list_len;
  551. $total_list = $this->PageNo + $list_len;
  552. if($total_list > $totalpage)
  553. {
  554. $total_list = $totalpage;
  555. }
  556. }
  557. else
  558. {
  559. $j=1;
  560. if($total_list > $totalpage)
  561. {
  562. $total_list = $totalpage;
  563. }
  564. }
  565. for($j; $j<=$total_list; $j++)
  566. {
  567. if($j == $this->PageNo)
  568. {
  569. $listdd.= "<li class=\"thisclass\"><a>$j</a></li>\r\n";
  570. }
  571. else
  572. {
  573. $listdd.="<li><a href='".$tnamerule."$j".$GLOBALS['art_shortname']."'>".$j."</a></li>\r\n";
  574. }
  575. }
  576. $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage;
  577. return $plist;
  578. }
  579. /**
  580. * 获取动态的分页列表
  581. *
  582. * @access private
  583. * @param int $list_len 列表宽度
  584. * @return string
  585. */
  586. function GetPageListDM($list_len)
  587. {
  588. $prepage="";
  589. $nextpage="";
  590. $prepagenum = $this->PageNo - 1;
  591. $nextpagenum = $this->PageNo + 1;
  592. if($list_len=="" || preg_match("/[^0-9]/", $list_len))
  593. {
  594. $list_len=3;
  595. }
  596. $totalpage = ceil($this->TotalResult / $this->PageSize);
  597. if($totalpage <= 1 && $this->TotalResult > 0)
  598. {
  599. return "<span class=\"pageinfo\">共1页/".$this->TotalResult."条记录</span>";
  600. }
  601. if($this->TotalResult == 0)
  602. {
  603. return "<span class=\"pageinfo\">共0页/".$this->TotalResult."条记录</span>";
  604. }
  605. $purl = $this->GetCurUrl();
  606. $geturl = "typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&";
  607. $hidenform = "<input type='hidden' name='typeid' value='".$this->TypeID."'>\r\n";
  608. $hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."'>\r\n";
  609. $purl .= "?".$geturl;
  610. //获得上一页和下一页的链接
  611. if($this->PageNo != 1)
  612. {
  613. $prepage.="<li><a href='".$purl."PageNo=$prepagenum'>上一页</a></li>\r\n";
  614. $indexpage="<li><a href='".$purl."PageNo=1'>首页</a></li>\r\n";
  615. }
  616. else
  617. {
  618. $indexpage="<li><a>首页</a></li>\r\n";
  619. }
  620. if($this->PageNo != $totalpage && $totalpage>1)
  621. {
  622. $nextpage.="<li><a href='".$purl."PageNo=$nextpagenum'>下一页</a></li>\r\n";
  623. $endpage="<li><a href='".$purl."PageNo=$totalpage'>末页</a></li>\r\n";
  624. }
  625. else
  626. {
  627. $endpage="<li><a>末页</a></li>";
  628. }
  629. //获得数字链接
  630. $listdd = "";
  631. $total_list = $list_len * 2 + 1;
  632. if($this->PageNo >= $total_list)
  633. {
  634. $j = $this->PageNo - $list_len;
  635. $total_list = $this->PageNo + $list_len;
  636. if($total_list > $totalpage)
  637. {
  638. $total_list = $totalpage;
  639. }
  640. }
  641. else
  642. {
  643. $j=1;
  644. if($total_list > $totalpage)
  645. {
  646. $total_list = $totalpage;
  647. }
  648. }
  649. for($j; $j<=$total_list; $j++)
  650. {
  651. if($j == $this->PageNo)
  652. {
  653. $listdd.= "<li class=\"thisclass\"><a>$j</a></li>\r\n";
  654. }
  655. else
  656. {
  657. $listdd.="<li><a href='".$purl."PageNo=$j'>".$j."</a></li>\r\n";
  658. }
  659. }
  660. $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage;
  661. return $plist;
  662. }
  663. /**
  664. * 获得当前的页面文件的url
  665. *
  666. * @access private
  667. * @return string
  668. */
  669. function GetCurUrl()
  670. {
  671. if(!empty($_SERVER["REQUEST_URI"]))
  672. {
  673. $nowurl = $_SERVER["REQUEST_URI"];
  674. $nowurls = explode("?",$nowurl);
  675. $nowurl = $nowurls[0];
  676. }
  677. else
  678. {
  679. $nowurl = $_SERVER["PHP_SELF"];
  680. }
  681. return $nowurl;
  682. }
  683. }//End Class