\r\n";
//$output.="
T:".$this->nums." ".$this->current_page." of ".$this->pageNums." ";
if($this->current_page > 1){
$firstPageUrl=$this->subPage_link."1";
$prewPageUrl=$this->subPage_link.($this->current_page-1);
$output .="
<< ";
$output .="
< ";
}else {
$output .="
<< ";
$output .="
< ";
}
$a=$this->construct_num_Page();
for($i=0;$i
current_page ){
$output .="".$s."";
}else{
$url=$this->subPage_link.$s;
$output .="".$s."";
}
}
if($this->current_page < $this->pageNums){
$lastPageUrl=$this->subPage_link.$this->pageNums;
$nextPageUrl=$this->subPage_link.($this->current_page+1);
$output .=" > ";
$output .=" >> ";
}else {
$output .=" > ";
$output .=" >> ";
}
$output .="";
$output .=" \r\n";
$this->output = $output; // chiu add it
}
}// end class
/********** Check View **********/
function LIB_isViewRec() {
return($_GET["mode"] == "View" && (!is_null($_GET["id"])));
}
function LIB_isNewRec() {
return($_GET["mode"] == "New");
}
function LIB_isListRec() {
return($_GET["mode"] == "");
}
/********** Create Folder **********/
function LIB_createFolder($basePath, $subPath, $folderMode=0777) {
$currPath = $basePath;
if (is_array($subPath)) {
foreach($subPath as $currDir) {
$currPath .= $currDir . "/";
if (!file_exists($currPath)) {
mkdir($currPath);
chmod($currPath, $folderMode);
}
}
}
else {
$currPath .= $subPath . "/";
if (!file_exists($currPath)) {
mkdir($currPath);
chmod($currPath, $folderMode);
}
}
if (file_exists($currPath))
return (true);
else
return (false);
}
/********* Date to mktime ***********/
function date2mktime($timestr) {
if (($timestr != "" ) && ($timestr != 0)) {
list($date, $time) = explode(' ', $timestr);
list($yyyy, $mm, $dd) = explode('-', $date);
if ($time != "")
list($hr, $min, $ss) = explode(':', $time);
else {
$hr=$min=$ss=0;
}
return mktime(intval($hr), intval($min), intval($ss), intval($mm), intval($dd), intval($yyyy));
} else
return 0;
}
function LIB_nl2li($str) {
$str = "