function MemberFav() { global $fsql, $tsql; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $memberid = $_COOKIE["MEMBERID"]; $scl = " memberid='{$memberid}' "; //Ä£°å½âÊÍ $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; include ROOTPATH . "includes/pages.inc.php"; $pages = new pages(); $totalnums = TblCount("_member_fav", "id", $scl); $pages->setvar(array("key" => $key)); $pages->set(20, $totalnums); $pagelimit = $pages->limit(); $fsql->query("select * from {P}_member_fav where {$scl} order by id desc limit {$pagelimit}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $url = $fsql->f('url'); $var = array('id' => $id, 'title' => $title, 'url' => $url); $str .= ShowTplTemp($TempArr["list"], $var); } $pagesinfo = $pages->ShowNow(); $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums); $str .= ShowTplTemp($TempArr["end"], $var); return $str; }
function ToolsQqCs() { global $msql; $showtj = $GLOBALS["PLUSVARS"]["showtj"]; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $scl = " cat='qq' and iffb='1' "; if ($showtj != "" && $showtj != "0") { $scl .= " and tj='1' "; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; $msql->query("select * from {P}_tools_code where {$scl} order by xuhao"); while ($msql->next_record()) { $id = $msql->f("id"); $qq = $msql->f("qq"); $name = $msql->f('name'); $position = $msql->f('position'); $tel = $msql->f('tel'); $phone = $msql->f('phone'); $memo = $msql->f('memo'); $code = $msql->f("code"); $xuhao = $msql->f("xuhao"); $var = array('id' => $id, 'qq' => $qq, 'name' => $name, 'position' => $position, 'tel' => $tel, 'phone' => $phone, 'memo' => $memo, 'code' => $code, 'xuhao' => $xuhao); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; return $str; }
function NewsProject() { global $msql, $fsql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $target = $GLOBALS["PLUSVARS"]["target"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); //循环开始 $var = array('coltitle' => $coltitle); $str = ShowTplTemp($TempArr["start"], $var); $msql->query("select * from {P}_news_proj order by id desc"); while ($msql->next_record()) { $id = $msql->f("id"); $project = $msql->f("project"); $folder = $msql->f("folder"); if ($cutword != "0") { $project = csubstr($project, 0, $cutword); } $link = ROOTPATH . "news/project/" . $folder . "/"; $var = array('link' => $link, 'project' => $project, 'target' => $target); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; return $str; }
function AdvsFixed() { global $msql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $groupid = $GLOBALS["PLUSVARS"]["groupid"]; $pdv = $GLOBALS["PLUSVARS"]["pdv"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $msql->query("select * from {P}_advs_pic where id='{$groupid}'"); if ($msql->next_record()) { $src = $msql->f('src'); $link = $msql->f('url'); } $src = ROOTPATH . $src; $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle, 'src' => $src, 'pdv' => $pdv, 'link' => $link); $str = ShowTplTemp($TempArr["start"], $var); if (substr($src, -4) == ".swf") { $str .= ShowTplTemp($TempArr["menu"], $var); } else { $str .= ShowTplTemp($TempArr["list"], $var); } $str .= ShowTplTemp($TempArr["end"], $var); return $str; }
function MemberNewsClass() { global $msql, $fsql; $target = $GLOBALS["PLUSVARS"]["target"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; //地址栏参数 if (isset($_GET["mid"]) && $_GET["mid"] != "" && $_GET["mid"] != "0") { $mid = $_GET["mid"]; } else { return ""; } $mid = htmlspecialchars($mid); $scl = " memberid='{$mid}' "; //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; $msql->query("select * from {P}_news_pcat where {$scl} order by xuhao"); while ($msql->next_record()) { $catid = $msql->f("catid"); $cat = $msql->f("cat"); $link = ROOTPATH . "news/membernews.php?mid=" . $mid . "&pcatid=" . $catid; $var = array('link' => $link, 'cat' => $cat, 'target' => $target); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; return $str; }
function AdvsSlides() { global $msql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $groupid = $GLOBALS["PLUSVARS"]["groupid"]; //Ä£°æ½âÊÍ $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle); $str .= ShowTplTemp($TempArr["start"], $var); $n = 0; $msql->query("select * from {P}_advs_lb where groupid='{$groupid}' order by xuhao limit 0,{$shownums}"); while ($msql->next_record()) { $id = $msql->f('id'); $src = $msql->f('src'); $url = $msql->f('url'); $title = $msql->f('title'); $text = $msql->f('text'); $src = ROOTPATH . $src; $var = array('n' => $n, 'src' => $src, 'url' => $url); $str .= ShowTplTemp($TempArr["list"], $var); $n++; } $str .= $TempArr["end"]; return $str; }
function LinkPic() { global $fsql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $groupid = $GLOBALS["PLUSVARS"]["groupid"]; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $target = $GLOBALS["PLUSVARS"]["target"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $scl = " groupid='{$groupid}' and src!='' "; //Ä£°æ½âÊÍ $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle, 'morelink' => $morelink); $str = ShowTplTemp($TempArr["start"], $var); $fsql->query("select * from {P}_advs_link where {$scl} order by xuhao limit 0,{$shownums}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $name = $fsql->f('name'); $link = $fsql->f('url'); $pic = $fsql->f('src'); $src = ROOTPATH . $pic; $var = array('name' => $name, 'link' => $link, 'src' => $src, 'target' => $target); if (substr($pic, -4) == ".swf") { $str .= ShowTplTemp($TempArr["menu"], $var); } else { $str .= ShowTplTemp($TempArr["list"], $var); } } $str .= $TempArr["end"]; return $str; }
function Logo() { global $msql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $groupid = $GLOBALS["PLUSVARS"]["groupid"]; $w = $GLOBALS["PLUSVARS"]["w"]; $h = $GLOBALS["PLUSVARS"]["h"]; $showborder = $GLOBALS["PLUSVARS"]["showborder"]; $padding = $GLOBALS["PLUSVARS"]["padding"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $msql->query("select * from {P}_advs_logo where id='{$groupid}'"); if ($msql->next_record()) { $src = $msql->f('src'); $link = $msql->f('url'); } $src = ROOTPATH . $src; $w = $w - $padding; $h = $h - $padding; if ($showborder != "none") { $w = $w - 1; $h = $h - 1; } $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle, 'src' => $src, 'w' => $w, 'h' => $h, 'link' => $link); $str = ShowTplTemp($TempArr["start"], $var); if (substr($src, -4) == ".swf") { $str .= ShowTplTemp($TempArr["menu"], $var); } else { $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; return $str; }
function ProductSameClass() { global $msql, $fsql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $showtj = $GLOBALS["PLUSVARS"]["showtj"]; $target = $GLOBALS["PLUSVARS"]["target"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; //地址栏参数 if (strstr($_SERVER["QUERY_STRING"], ".html")) { $Arr = explode(".html", $_SERVER["QUERY_STRING"]); $nowcatid = $Arr[0]; } elseif ($_GET["catid"] > 0) { $nowcatid = $_GET["catid"]; } else { $nowcatid = 0; } $nowcatid = htmlspecialchars($nowcatid); if ($nowcatid != "0") { $msql->query("select pid from {P}_product_cat where catid='{$nowcatid}'"); if ($msql->next_record()) { $pid = $msql->f("pid"); } else { $pid = 0; } } else { $pid = 0; } $scl = " pid='{$pid}' "; if ($showtj != "" && $showtj != "0") { $scl .= " and tj='1' "; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); //循环开始 $var = array('coltitle' => $coltitle); $str = ShowTplTemp($TempArr["start"], $var); $msql->query("select * from {P}_product_cat where {$scl} order by xuhao"); while ($msql->next_record()) { $pid = $msql->f("pid"); $catid = $msql->f("catid"); $cat = $msql->f("cat"); $catpath = $msql->f("catpath"); $ifchannel = $msql->f('ifchannel'); if ($ifchannel == "1") { $link = ROOTPATH . "product/class/" . $catid . "/"; } else { if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "product/class/" . $catid . ".html")) { $link = ROOTPATH . "product/class/" . $catid . ".html"; } else { $link = ROOTPATH . "product/class/?" . $catid . ".html"; } } $var = array('link' => $link, 'cat' => $cat, 'target' => $target); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; return $str; }
function JobNavPath() { global $msql; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $pagename = $GLOBALS["PLUSVARS"]["pagename"]; $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('sitename' => $GLOBALS["CONF"]["SiteName"]); $str = ShowTplTemp($TempArr["start"], $var); if ($pagename == "detail") { $str .= ShowTplTemp($TempArr["col"], $var); //获取地址栏参数 if (strstr($_SERVER["QUERY_STRING"], ".html")) { $idArr = explode(".html", $_SERVER["QUERY_STRING"]); $id = $idArr[0]; } elseif (isset($_GET["id"]) && $_GET["id"] != "") { $id = $_GET["id"]; } $msql->query("select jobname from {P}_job where id='{$id}'"); if ($msql->next_record()) { $jobname = $msql->f('jobname'); } $var = array('nav' => $jobname); $str .= ShowTplTemp($TempArr["con"], $var); $GLOBALS["pagetitle"] = $jobname; } else { $str .= ShowTplTemp($TempArr["col"], $var); } $str .= $TempArr["end"]; return $str; }
function PageTitleList() { global $fsql, $msql; //插件设置 $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $target = $GLOBALS["PLUSVARS"]["target"]; $groupid = $GLOBALS["PLUSVARS"]["groupid"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; if ($groupid != 0 && $groupid != "") { $fsql->query("select folder from {P}_page_group where id='{$groupid}'"); if ($fsql->next_record()) { $folder = $fsql->f('folder'); } } else { $str = "NO GROUPID"; return $str; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle); $str = ShowTplTemp($TempArr["start"], $var); $fsql->query("select * from {P}_page where groupid='{$groupid}' order by xuhao limit 0,{$shownums}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $url = $fsql->f('url'); $pagefolder = $fsql->f('pagefolder'); //链接,如果有跳转网址则优先跳转 20090503 if (strlen($url) > 1) { if (substr($url, 0, 7) == "http://") { $link = $url; } else { $link = ROOTPATH . $url; } } else { //如果有独立页,优先独立页 if ($pagefolder != "" && file_exists(ROOTPATH . "page/" . $folder . "/" . $pagefolder . ".php")) { $link = ROOTPATH . "page/" . $folder . "/" . $pagefolder . ".php"; } else { if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "page/" . $folder . "/" . $id . ".html")) { $link = ROOTPATH . "page/" . $folder . "/" . $id . ".html"; } else { $link = ROOTPATH . "page/" . $folder . "/?" . $id . ".html"; } } } if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } //模版标签解释 $var = array('title' => $title, 'link' => $link, 'target' => $target); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; return $str; }
function FeedBackSmallForm() { global $fsql, $tsql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $groupid = $GLOBALS["PLUSVARS"]["groupid"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle); $str = ShowTplTemp($TempArr["start"], $var); //调用表单 $fsql->query("select * from {P}_feedback where groupid='{$groupid}' and use_field = '1' order by xuhao"); while ($fsql->next_record()) { $field_caption = $fsql->f('field_caption'); $field_type = $fsql->f('field_type'); $field_size = $fsql->f('field_size'); $field_name = $fsql->f('field_name'); $field_value = $fsql->f('field_value'); $field_null = $fsql->f('field_null'); $field_value_repeat = $fsql->f('value_repeat'); $field_intro = $fsql->f('field_intro'); $field_null = $field_null == "1" ? $mustfill = "<font style='color:red'>*</font>" : ($mustfill = ""); if ($field_type == "5") { if ($step == "send") { $nowvalue = $_POST[$field_name]; } $fieldvalue = explode(";", $field_value); $nums = count($fieldvalue); for ($i = 0; $i < $nums; $i++) { if ($fieldvalue[$i] == $nowvalue) { $checked_select = "selected"; } else { $checked_select = ""; } $list .= "<option value=" . $fieldvalue[$i] . " " . $checked_select . ">" . $fieldvalue[$i] . "</option>"; } $var = array('title' => $field_caption, 'size' => $field_size, 'fieldname' => $field_name, 'fieldvalue' => $field_value, 'mustfill' => $mustfill, 'list' => $list, 'intro' => $field_intro); $str .= ShowTplTemp($TempArr["list"], $var); $list = ""; } elseif ($field_type == "2") { if ($step == "send") { $field_value = $_POST[$field_name]; } $var = array('title' => $field_caption, 'size' => $field_size, 'fieldname' => $field_name, 'fieldvalue' => $field_value, 'mustfill' => $mustfill, 'intro' => $field_intro); $str .= ShowTplTemp($TempArr["textarea"], $var); } else { if ($step == "send") { $field_value = $_POST[$field_name]; } elseif ($field_name == "title" && $_GET["rel"] != "") { $field_value = $_GET["rel"]; } $var = array('title' => $field_caption, 'size' => $field_size, 'fieldname' => $field_name, 'fieldvalue' => $field_value, 'mustfill' => $mustfill, 'intro' => $field_intro); $str .= ShowTplTemp($TempArr["input"], $var); } } $var = array('groupid' => $groupid); $str .= ShowTplTemp($TempArr["end"], $var); return $str; }
function MemberCentLog() { global $msql, $fsql, $strCentFormAdmin; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $memberid = $_COOKIE["MEMBERID"]; //模板解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); //取出当前积分 $msql->query("select * from {P}_member where memberid='" . $_COOKIE["MEMBERID"] . "'"); if ($msql->next_record()) { $cent1 = $msql->f('cent1'); $cent2 = $msql->f('cent2'); $cent3 = $msql->f('cent3'); $cent4 = $msql->f('cent4'); $cent5 = $msql->f('cent5'); } $cw1 = MemberCentWidth($cent1); $cw2 = MemberCentWidth($cent2); $cw3 = MemberCentWidth($cent3); $cw4 = MemberCentWidth($cent4); $cw5 = MemberCentWidth($cent5); $var = array('centname1' => $GLOBALS["MEMBERCONF"]["centname1"], 'centname2' => $GLOBALS["MEMBERCONF"]["centname2"], 'centname3' => $GLOBALS["MEMBERCONF"]["centname3"], 'centname4' => $GLOBALS["MEMBERCONF"]["centname4"], 'centname5' => $GLOBALS["MEMBERCONF"]["centname5"], 'cw1' => $cw1, 'cw2' => $cw2, 'cw3' => $cw3, 'cw4' => $cw4, 'cw5' => $cw5, 'cent1' => $cent1, 'cent2' => $cent2, 'cent3' => $cent3, 'cent4' => $cent4, 'cent5' => $cent5); $str = ShowTplTemp($TempArr["start"], $var); $scl = " memberid='{$memberid}' "; include ROOTPATH . "includes/pages.inc.php"; $pages = new pages(); $totalnums = TblCount("_member_centlog", "id", $scl); $pages->setvar(array("key" => $key)); $pages->set(20, $totalnums); $pagelimit = $pages->limit(); $msql->query("select * from {P}_member_centlog where {$scl} order by dtime desc limit {$pagelimit}"); while ($msql->next_record()) { $id = $msql->f('id'); $event = $msql->f('event'); $dtime = $msql->f('dtime'); $cent1 = $msql->f('cent1'); $cent2 = $msql->f('cent2'); $cent3 = $msql->f('cent3'); $cent4 = $msql->f('cent4'); $cent5 = $msql->f('cent5'); $memo = $msql->f('memo'); if ($event == "0") { $eventname = $memo; } else { $fsql->query("select name from {P}_member_centrule where event='{$event}' "); if ($fsql->next_record()) { $eventname = $fsql->f('name'); } } $dtime = date("Y/m/d H:i:s", $dtime); $var = array('id' => $id, 'eventname' => $eventname, 'dtime' => $dtime, 'cent1' => $cent1, 'cent2' => $cent2, 'cent3' => $cent3, 'cent4' => $cent4, 'cent5' => $cent5); $str .= ShowTplTemp($TempArr["list"], $var); } $pagesinfo = $pages->ShowNow(); $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums); $str .= ShowTplTemp($TempArr["end"], $var); return $str; }
function MemberComment() { global $fsql, $tsql; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $memberid = $_COOKIE["MEMBERID"]; $scl = " pid='0' and memberid='{$memberid}' "; //模板解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; include ROOTPATH . "includes/pages.inc.php"; $pages = new pages(); $totalnums = TblCount("_comment", "id", $scl); $pages->setvar(array("key" => $key)); $pages->set(20, $totalnums); $pagelimit = $pages->limit(); $fsql->query("select * from {P}_comment where {$scl} order by uptime desc limit {$pagelimit}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $iffb = $fsql->f('iffb'); $rid = $fsql->f('rid'); $catid = $fsql->f('catid'); $dtime = $fsql->f('dtime'); $uptime = $fsql->f('uptime'); $cl = $fsql->f('cl'); $lastname = $fsql->f('lastname'); $lastmemberid = $fsql->f('lastmemberid'); $backcount = $fsql->f('backcount'); $title = csubstr($title, 0, 23); //是否今日新贴 if ($uptime > time() - 86400) { $querycss = "binew"; } else { $querycss = "bi"; } $dtime = date("Y-m-d", $dtime); $uptime = date("Y-m-d", $uptime); if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "comment/html/" . $id . ".html")) { $link = ROOTPATH . "comment/html/" . $id . ".html"; } else { $link = ROOTPATH . "comment/html/?" . $id . ".html"; } //回复者网址 if ($lastmemberid == "-1") { $lastmemberurl = "#"; } else { $lastmemberurl = ROOTPATH . "member/home.php?mid=" . $lastmemberid; } $var = array('id' => $id, 'title' => $title, 'dtime' => $dtime, 'uptime' => $uptime, 'backcount' => $backcount, 'querycss' => $querycss, 'cl' => $cl, 'link' => $link, 'lastname' => $lastname, 'lastmemberurl' => $lastmemberurl, 'face' => $face); $str .= ShowTplTemp($TempArr["list"], $var); } $pagesinfo = $pages->ShowNow(); $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums); $str .= ShowTplTemp($TempArr["end"], $var); return $str; }
function MemberTags() { global $fsql, $msql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $target = $GLOBALS["PLUSVARS"]["target"]; $tags = $GLOBALS["PLUSVARS"]["tags"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $picw = $GLOBALS["PLUSVARS"]["picw"]; $pich = $GLOBALS["PLUSVARS"]["pich"]; //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle); $str = ShowTplTemp($TempArr["start"], $var); //查询条件 $scl = " memberid!='0' "; //判断匹配标签 if ($tags != "") { $tags = $tags . ","; $scl .= " and tags regexp '{$tags}' "; } //积分名称 $msql->query("select * from {P}_member_centset"); if ($msql->next_record()) { $centname1 = $msql->f('centname1'); $centname2 = $msql->f('centname2'); $centname3 = $msql->f('centname3'); $centname4 = $msql->f('centname4'); $centname5 = $msql->f('centname5'); } $picnum = 1; $fsql->query("select * from {P}_member where {$scl} order by cent1 desc limit 0,{$shownums}"); while ($fsql->next_record()) { $mid = $fsql->f('memberid'); $pname = $fsql->f('pname'); $nowface = $fsql->f('nowface'); $tags = $fsql->f('tags'); $cent1 = $fsql->f('cent1'); $cent2 = $fsql->f('cent2'); $cent3 = $fsql->f('cent3'); $cent4 = $fsql->f('cent4'); $cent5 = $fsql->f('cent5'); $memberurl = ROOTPATH . "member/home.php?mid=" . $mid; $face = ROOTPATH . "member/face/" . $nowface . ".gif"; $tagsArr = explode(",", $tags); $tag1 = $tagsArr[0]; $tag2 = $tagsArr[1]; $tag3 = $tagsArr[2]; //模版标签解释 $var = array('pname' => $pname, 'face' => $face, 'picw' => $picw, 'pich' => $pich, 'tag1' => $tag1, 'tag2' => $tag2, 'tag3' => $tag3, 'memberurl' => $memberurl, 'centname1' => $centname1, 'centname2' => $centname2, 'centname3' => $centname3, 'centname4' => $centname4, 'centname5' => $centname5, 'cent1' => $cent1, 'cent2' => $cent2, 'cent3' => $cent3, 'cent4' => $cent4, 'cent5' => $cent5, 'target' => $target, 'picnum' => $picnum); $str .= ShowTplTemp($TempArr["list"], $var); $picnum++; } $str .= $TempArr["end"]; return $str; }
function TopMenu() { global $msql, $SiteUrl; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $groupid = $GLOBALS["PLUSVARS"]["groupid"]; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle); $str = ShowTplTemp($TempArr["start"], $var); $msql->query("select * from {P}_menu where ifshow='1' and groupid='{$groupid}' order by xuhao limit 0,{$shownums}"); while ($msql->next_record()) { $id = $msql->f('id'); $menu = $msql->f('menu'); $linktype = $msql->f('linktype'); $coltype = $msql->f('coltype'); $folder = $msql->f('folder'); $url = $msql->f('url'); $target = $msql->f('target'); switch ($linktype) { //1=内部链接 case "1": $menuurl = ROOTPATH . $folder; break; //2=外部链接 //2=外部链接 case "2": $menuurl = $url; break; //链接到模块 //链接到模块 default: if ($coltype == "index") { //首页特殊处理 if ($GLOBALS["CONF"]["CatchOpen"] == "1") { $menuurl = ROOTPATH; } else { $menuurl = ROOTPATH . "index.php"; } } else { //正常模块链接 if ($GLOBALS["CONF"]["CatchOpen"] == "1") { $menuurl = ROOTPATH . $coltype . "/"; } else { $menuurl = ROOTPATH . $coltype . "/index.php"; } } break; } $var = array('menu' => $menu, 'menuurl' => $menuurl, 'target' => $target); $str .= ShowTplTemp($TempArr["menu"], $var); } $str .= $TempArr["end"]; return $str; }
function MVMenu() { global $msql, $fsql; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $tempcolor = $GLOBALS["PLUSVARS"]["tempcolor"]; $groupid = $GLOBALS["PLUSVARS"]["groupid"]; //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('tempcolor' => $tempcolor); $str .= ShowTplTemp($TempArr["start"], $var); $msql->query("select * from {P}_menu where ifshow='1' and groupid='{$groupid}' and pid='0' order by xuhao "); while ($msql->next_record()) { $topid = $msql->f("id"); $topmenu = $msql->f("menu"); $menustr = ""; $fsql->query("select * from {P}_menu where ifshow='1' and pid='{$topid}' order by xuhao "); while ($fsql->next_record()) { $id = $fsql->f("id"); $menu = $fsql->f("menu"); $linktype = $fsql->f('linktype'); $coltype = $fsql->f('coltype'); $folder = $fsql->f('folder'); $url = $fsql->f('url'); $target = $fsql->f('target'); switch ($linktype) { case "1": $menuurl = ROOTPATH . $folder; break; case "2": $menuurl = $url; break; default: if ($coltype == "index") { if ($GLOBALS["CONF"]["CatchOpen"] == "1") { $menuurl = ROOTPATH; } else { $menuurl = ROOTPATH . "index.php"; } } else { if ($GLOBALS["CONF"]["CatchOpen"] == "1") { $menuurl = ROOTPATH . $coltype . "/"; } else { $menuurl = ROOTPATH . $coltype . "/index.php"; } } break; } $menustr .= "<li><a href='" . $menuurl . "' target='" . $target . "'>" . $menu . "</a></li>"; } $var = array('menustr' => $menustr, 'topmenu' => $topmenu); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; return $str; }
function FeedBackNavPath() { global $msql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $pagename = $GLOBALS["PLUSVARS"]["pagename"]; $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle, 'sitename' => $GLOBALS["CONF"]["SiteName"], 'channel' => $GLOBALS["PSET"]["name"], 'groupname' => $GLOBALS["groupname"]); $str = ShowTplTemp($TempArr["start"], $var); $str .= $TempArr["end"]; return $str; }
function MemberMsn() { global $fsql, $tsql, $strMemberMsnNtc2; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $memberid = $_COOKIE["MEMBERID"]; $scl = " tomemberid='{$memberid}' "; //模板解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; include ROOTPATH . "includes/pages.inc.php"; $pages = new pages(); $totalnums = TblCount("_member_msn", "id", $scl); $pages->setvar(array("key" => $key)); $pages->set(10, $totalnums); $pagelimit = $pages->limit(); $fsql->query("select * from {P}_member_msn where {$scl} order by dtime desc limit {$pagelimit}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $body = $fsql->f('body'); $dtime = $fsql->f('dtime'); $frommemberid = $fsql->f('frommemberid'); $dtime = date("Y-m-d h:i:s", $dtime); $body = nl2br($body); if ($frommemberid != "0") { $tsql->query("select * from {P}_member where memberid='{$frommemberid}'"); if ($tsql->next_record()) { $pname = $tsql->f("pname"); $nowface = $tsql->f("nowface"); } $face = ROOTPATH . "member/face/" . $nowface . ".gif"; $memberurl = ROOTPATH . "member/home.php?mid=" . $frommemberid; $showback = "block"; } else { $pname = $strMemberMsnNtc2; $face = ROOTPATH . "member/face/1.gif"; $memberurl = "#"; $showback = "none"; } $var = array('id' => $id, 'body' => $body, 'dtime' => $dtime, 'mid' => $frommemberid, 'face' => $face, 'memberurl' => $memberurl, 'showback' => $showback, 'pname' => $pname); $str .= ShowTplTemp($TempArr["list"], $var); } //标注为已读 $tsql->query("update {P}_member_msn set iflook='1' where tomemberid='{$memberid}'"); $pagesinfo = $pages->ShowNow(); $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums); $str .= ShowTplTemp($TempArr["end"], $var); return $str; }
function MailLogin() { $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $link = $GLOBALS["PLUSVARS"]["link"]; $domain = $GLOBALS["PLUSVARS"]["word"]; $formname = $GLOBALS["PLUSVARS"]["word1"]; $formpass = $GLOBALS["PLUSVARS"]["word2"]; $formdomain = $GLOBALS["PLUSVARS"]["word3"]; $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('link' => $link, 'domain' => $domain, 'formname' => $formname, 'formpass' => $formpass, 'formdomain' => $formdomain); $str = ShowTplTemp($TempArr["start"], $var); return $str; }
function IconSource() { $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $sourceurl = $GLOBALS["PLUSVARS"]["sourceurl"]; $link = $GLOBALS["PLUSVARS"]["link"]; $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('sourceurl' => $sourceurl, 'link' => $link); if ($link != "") { $str .= ShowTplTemp($TempArr["link"], $var); } else { $str .= ShowTplTemp($TempArr["text"], $var); } return $str; }
function NewsTreeClass() { global $msql, $fsql; $catid = $GLOBALS["PLUSVARS"]["catid"]; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $showtj = $GLOBALS["PLUSVARS"]["showtj"]; $target = $GLOBALS["PLUSVARS"]["target"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $scl = " catid!='0' "; if ($showtj != "" && $showtj != "0") { $scl .= " and tj='1' "; } if ($catid != 0 && $catid != "") { $catid = fmpath($catid); $scl .= " and catpath regexp '{$catid}' "; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); //循环开始 $var = array('coltitle' => $coltitle, 'target' => $target); $str = ShowTplTemp($TempArr["start"], $var); $msql->query("select * from {P}_news_cat where {$scl} order by xuhao"); while ($msql->next_record()) { $pid = $msql->f("pid"); $catid = $msql->f("catid"); $cat = $msql->f("cat"); $catpath = $msql->f("catpath"); $ifchannel = $msql->f('ifchannel'); $fsql->query("select count(id) from {P}_news_con where catpath regexp '" . fmpath($catid) . "'"); if ($fsql->next_record()) { $nums = $fsql->f('count(id)'); } if ($ifchannel == "1") { $url = ROOTPATH . "news/class/" . $catid . "/"; } else { if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "news/class/" . $catid . ".html")) { $url = ROOTPATH . "news/class/" . $catid . ".html"; } else { $url = ROOTPATH . "news/class/?" . $catid . ".html"; } } $var = array('url' => $url, 'catid' => $catid, 'pid' => $pid, 'cat' => $cat, 'nums' => $nums, 'target' => $target); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; return $str; }
function DiyHeadTraFlash() { $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $pic = $GLOBALS["PLUSVARS"]["pic"]; $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $src = ROOTPATH . $pic; $var = array('src' => $src); $str = ShowTplTemp($TempArr["start"], $var); if (substr($pic, -4) == ".swf") { $str .= ShowTplTemp($TempArr["menu"], $var); } else { $str .= ShowTplTemp($TempArr["list"], $var); } return $str; }
function JobList() { global $fsql, $msql; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $target = $GLOBALS["PLUSVARS"]["target"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; $fsql->query("select * from {P}_job where iffb='1' and jobstat='1' order by uptime desc limit 0,{$shownums}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $jobname = $fsql->f('jobname'); $jobtype = $fsql->f('jobtype'); $experience = $fsql->f('experience'); $education = $fsql->f('education'); $langneed = $fsql->f('langneed'); $langlevel = $fsql->f('langlevel'); $pnums = $fsql->f('pnums'); $jobaddr = $fsql->f('jobaddr'); $jobintro = $fsql->f('jobintro'); $jobrequest = $fsql->f('jobrequest'); $jobstat = $fsql->f('jobstat'); $contact = $fsql->f('contact'); $tel = $fsql->f('tel'); $email = $fsql->f('email'); $dtime = $fsql->f('dtime'); $uptime = $fsql->f('uptime'); $dtime = date("Y-m-d", $dtime); $uptime = date("Y-m-d", $uptime); if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "job/html/" . $id . ".html")) { $link = ROOTPATH . "job/html/" . $id . ".html"; } else { $link = ROOTPATH . "job/html/?" . $id . ".html"; } if ($cutword != "0") { $jobname = csubstr($jobname, 0, $cutword); } //模版标签解释 $var = array('jobid' => $id, 'jobname' => $jobname, 'dtime' => $dtime, 'uptime' => $uptime, 'jobtype' => $jobtype, 'experience' => $experience, 'education' => $education, 'langneed' => $langneed, 'langlevel' => $langlevel, 'pnums' => $pnums, 'jobaddr' => $jobaddr, 'jobintro' => $jobintro, 'jobrequest' => $jobrequest, 'link' => $link, 'target' => $target, 'contact' => $contact, 'tel' => $tel, 'email' => $email); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; return $str; }
function MemberNotice() { global $fsql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $target = $GLOBALS["PLUSVARS"]["target"]; $membertypeid = $_COOKIE["MEMBERTYPEID"]; if ($membertypeid == "") { return ""; } $scl = " membertypeid='{$membertypeid}' or membertypeid='0' "; //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; $fsql->query("select * from {P}_member_notice where {$scl} order by dtime desc limit 0,{$shownums}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $dtime = $fsql->f('dtime'); $ifnew = $fsql->f('ifnew'); $ifred = $fsql->f('ifred'); $cl = $fsql->f('cl'); $link = ROOTPATH . "member/member_notice.php?id=" . $id; $dtime = date("Y-m-d", $dtime); if ($ifnew == "1") { $bold = " style='font-weight:bold' "; } else { $bold = ""; } if ($ifred == "1") { $red = " style='color:#ff0000' "; } else { $red = ""; } if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } $var = array('title' => $title, 'dtime' => $dtime, 'red' => $red, 'cl' => $cl, 'link' => $link, 'target' => $target, 'bold' => $bold); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; return $str; }
function JobContent() { global $fsql, $msql; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; //获取地址栏参数 if (strstr($_SERVER["QUERY_STRING"], ".html")) { $idArr = explode(".html", $_SERVER["QUERY_STRING"]); $id = $idArr[0]; } elseif (isset($_GET["id"]) && $_GET["id"] != "") { $id = $_GET["id"]; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $fsql->query("select * from {P}_job where id='{$id}'"); if ($fsql->next_record()) { $jobname = $fsql->f('jobname'); $jobtype = $fsql->f('jobtype'); $experience = $fsql->f('experience'); $education = $fsql->f('education'); $langneed = $fsql->f('langneed'); $langlevel = $fsql->f('langlevel'); $pnums = $fsql->f('pnums'); $jobaddr = $fsql->f('jobaddr'); $jobintro = $fsql->f('jobintro'); $jobrequest = $fsql->f('jobrequest'); $jobstat = $fsql->f('jobstat'); $contact = $fsql->f('contact'); $tel = $fsql->f('tel'); $email = $fsql->f('email'); $dtime = $fsql->f('dtime'); $uptime = $fsql->f('uptime'); } else { $str .= $TempArr["err1"]; return $str; } $fsql->query("update {P}_job set cl=cl+1 where id='{$id}'"); //页头标题定义 $GLOBALS["pagetitle"] = $jobname; $dtime = date("Y-m-d", $dtime); $uptime = date("Y-m-d", $uptime); $jobintro = nl2br($jobintro); $var = array('jobid' => $id, 'jobname' => $jobname, 'dtime' => $dtime, 'uptime' => $uptime, 'jobtype' => $jobtype, 'experience' => $experience, 'education' => $education, 'langneed' => $langneed, 'langlevel' => $langlevel, 'pnums' => $pnums, 'jobaddr' => $jobaddr, 'jobintro' => $jobintro, 'jobrequest' => $jobrequest, 'link' => $link, 'target' => $target, 'contact' => $contact, 'tel' => $tel, 'email' => $email); $str = ShowTplTemp($TempArr["start"], $var); return $str; }
function MemberBuyList() { global $msql, $fsql; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $memberid = $_COOKIE["MEMBERID"]; //模板解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); //取出当前帐户信息 $msql->query("select * from {P}_member where memberid='" . $_COOKIE["MEMBERID"] . "'"); if ($msql->next_record()) { $account = $msql->f('account'); $paytotal = $msql->f('paytotal'); $buytotal = $msql->f('buytotal'); } $var = array('account' => $account, 'paytotal' => $paytotal, 'buytotal' => $buytotal); $str = ShowTplTemp($TempArr["start"], $var); $scl = " memberid='{$memberid}' "; include ROOTPATH . "includes/pages.inc.php"; $pages = new pages(); $totalnums = TblCount("_member_buylist", "id", $scl); $pages->setvar(array("key" => $key)); $pages->set(20, $totalnums); $pagelimit = $pages->limit(); $msql->query("select * from {P}_member_buylist where {$scl} order by id desc limit {$pagelimit}"); while ($msql->next_record()) { $id = $msql->f('id'); $payid = $msql->f('payid'); $paytype = $msql->f('paytype'); $buyfrom = $msql->f('buyfrom'); $paytotal = $msql->f('paytotal'); $daytime = $msql->f('daytime'); $ip = $msql->f('ip'); $orderid = $msql->f('orderid'); $OrderNo = $msql->f('OrderNo'); $logname = $msql->f('logname'); $daytime = date("Y-n-j H:i:s", $daytime); $var = array('id' => $id, 'payid' => $payid, 'paytype' => $paytype, 'buyfrom' => $buyfrom, 'paytotal' => $paytotal, 'daytime' => $daytime, 'ip' => $ip, 'OrderNo' => $OrderNo, 'logname' => $logname, 'orderid' => $orderid); $str .= ShowTplTemp($TempArr["list"], $var); } $pagesinfo = $pages->ShowNow(); $var = array('showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums); $str .= ShowTplTemp($TempArr["end"], $var); return $str; }
function Words() { $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $word = $GLOBALS["PLUSVARS"]["word"]; $link = $GLOBALS["PLUSVARS"]["link"]; $pdvid = $GLOBALS["PLUSVARS"]["pdv"]; $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle, 'pdvid' => $pdvid, 'word' => $word, 'link' => $link); $str = ShowTplTemp($TempArr["start"], $var); if ($link != "") { $str .= ShowTplTemp($TempArr["link"], $var); } else { $str .= ShowTplTemp($TempArr["text"], $var); } return $str; }
function Text() { $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $text = $GLOBALS["PLUSVARS"]["text"]; $link = $GLOBALS["PLUSVARS"]["link"]; $text = nl2br($text); $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle, 'text' => $text, 'link' => $link); $str = ShowTplTemp($TempArr["start"], $var); if ($link != "") { $str .= ShowTplTemp($TempArr["link"], $var); } else { $str .= ShowTplTemp($TempArr["text"], $var); } return $str; }
function ProductClass() { global $msql, $fsql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $catid = $GLOBALS["PLUSVARS"]["catid"]; $showtj = $GLOBALS["PLUSVARS"]["showtj"]; $target = $GLOBALS["PLUSVARS"]["target"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; if ($catid != 0 && $catid != "") { $scl = " pid='{$catid}' "; } else { $scl = " pid='0' "; } if ($showtj != "" && $showtj != "0") { $scl .= " and tj='1' "; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); //循环开始 $var = array('coltitle' => $coltitle); $str = ShowTplTemp($TempArr["start"], $var); $msql->query("select * from {P}_product_cat where {$scl} order by xuhao"); while ($msql->next_record()) { $pid = $msql->f("pid"); $catid = $msql->f("catid"); $cat = $msql->f("cat"); $catpath = $msql->f("catpath"); $ifchannel = $msql->f('ifchannel'); if ($ifchannel == "1") { $link = ROOTPATH . "product/class/" . $catid . "/"; } else { if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "product/class/" . $catid . ".html")) { $link = ROOTPATH . "product/class/" . $catid . ".html"; } else { $link = ROOTPATH . "product/class/?" . $catid . ".html"; } } $var = array('link' => $link, 'cat' => $cat, 'target' => $target); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; return $str; }