function create_poll() { global $msql; $logging = $_POST["logging"]; $expire = $_POST["expire"]; $day = $_POST["day"]; $status = $_POST["status"]; $groupname = $_POST["groupname"]; $timestamp = time(); if (!isset($expire)) { $expire = 0; } if (!isset($day)) { $day = $timestamp; } else { $exp_time = $timestamp + $day * 86400; } if (!get_magic_quotes_gpc()) { $groupname = addslashes($groupname); } $msql->query(" INSERT INTO {P}_tools_photopollindex set\r\n\t\t\tcatpath='{$catpath}',\r\n\t\t\tcat='{$groupname}',\r\n\t\t groupname='{$groupname}',\r\n\t\t timestamp='{$timestamp}',\r\n\t\t status='{$status}',\r\n\t\t exp_time='{$exp_time}',\r\n\t\t expire='{$expire}'\r\n\t\t"); $nowcatid = $msql->instid(); $nowpath = fmpath($nowcatid); $catpath = $nowpath . ":"; $msql->query("update {P}_tools_photopollindex set catpath='{$catpath}' where id='{$nowcatid}'"); }
function PhotoFabu() { global $msql, $fsql, $tsql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $memberid = $_COOKIE["MEMBERID"]; $memberid = htmlspecialchars($memberid); //个人分类 $fsql->query("select * from {P}_photo_pcat where memberid='{$memberid}' order by xuhao"); while ($fsql->next_record()) { $pcatid = $fsql->f("catid"); $pcat = $fsql->f("cat"); $pcatlist .= "<option value='" . $pcatid . "'>" . $pcat . "</option>"; } //获取公共分类授权 $secureset = SecureClass("156"); //公共分类 $fsql->query("select * from {P}_photo_cat order by catpath"); while ($fsql->next_record()) { $lpid = $fsql->f("pid"); $lcatid = $fsql->f("catid"); $cat = $fsql->f("cat"); $catpath = $fsql->f("catpath"); $lcatpath = explode(":", $catpath); //当主分类有授权时读取下级分类 if (strstr($secureset, ":" . intval($lcatpath[0]) . ":")) { for ($i = 0; $i < sizeof($lcatpath) - 2; $i++) { $lcatpath[$i] = intval($lcatpath[$i]); $tsql->query("select catid,cat from {P}_photo_cat where catid='{$lcatpath[$i]}'"); if ($tsql->next_record()) { $ncatid = $tsql->f('cat'); $ncat = $tsql->f('cat'); $ppcat .= $ncat . "/"; } } if ($pid == $lcatid) { $catlist .= "<option value='" . $lcatid . "' selected>" . $ppcat . $cat . "</option>"; } else { $catlist .= "<option value='" . $lcatid . "'>" . $ppcat . $cat . "</option>"; } $ppcat = ""; } } //专题 $fsql->query("select * from {P}_photo_proj order by id desc"); while ($fsql->next_record()) { $projid = $fsql->f("id"); $project = $fsql->f("project"); $NowPath = fmpath($projid); $musellist .= "<option value=" . $NowPath . ">" . $project . "</option>"; } //模版解释 $Temp = LoadTemp($tempname); $var = array('pname' => $_COOKIE["MEMBERPNAME"], 'catlist' => $catlist, 'pcatlist' => $pcatlist, 'musellist' => $musellist); $str .= ShowTplTemp($Temp, $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 DownFabu() { global $msql, $fsql, $tsql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $memberid = $_COOKIE["MEMBERID"]; $memberid = htmlspecialchars($memberid); //个人分类 $fsql->query("select * from {P}_down_pcat where memberid='{$memberid}' order by xuhao"); while ($fsql->next_record()) { $pcatid = $fsql->f("catid"); $pcat = $fsql->f("cat"); $pcatlist .= "<option value='" . $pcatid . "'>" . $pcat . "</option>"; } //获取公共分类授权 $secureset = SecureClass("166"); //公共分类 $fsql->query("select * from {P}_down_cat order by catpath"); while ($fsql->next_record()) { $lpid = $fsql->f("pid"); $lcatid = $fsql->f("catid"); $cat = $fsql->f("cat"); $catpath = $fsql->f("catpath"); $lcatpath = explode(":", $catpath); //当主分类有授权时读取下级分类 if (strstr($secureset, ":" . intval($lcatpath[0]) . ":")) { for ($i = 0; $i < sizeof($lcatpath) - 2; $i++) { $lcatpath[$i] = intval($lcatpath[$i]); $tsql->query("select catid,cat from {P}_down_cat where catid='{$lcatpath[$i]}'"); if ($tsql->next_record()) { $ncatid = $tsql->f('cat'); $ncat = $tsql->f('cat'); $ppcat .= $ncat . "/"; } } if ($pid == $lcatid) { $catlist .= "<option value='" . $lcatid . "' selected>" . $ppcat . $cat . "</option>"; } else { $catlist .= "<option value='" . $lcatid . "'>" . $ppcat . $cat . "</option>"; } $ppcat = ""; } } //专题 $fsql->query("select * from {P}_down_proj order by id desc"); while ($fsql->next_record()) { $projid = $fsql->f("id"); $project = $fsql->f("project"); $NowPath = fmpath($projid); $musellist .= "<option value=" . $NowPath . ">" . $project . "</option>"; } //积分名称 $defcentid = $GLOBALS["DOWNCONF"]["DefaultCentId"]; $centyj = $GLOBALS["DOWNCONF"]["CentYj"] * 100; if ($defcentid < 1 || $defcentid > 5) { $defcentid = "1"; } $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'); } $centstr = "centname" . $defcentid; $centlist = "<option value='" . $defcentid . "'>" . ${$centstr} . "</option>"; //模版解释 $Temp = LoadTemp($tempname); $var = array('pname' => $_COOKIE["MEMBERPNAME"], 'catlist' => $catlist, 'pcatlist' => $pcatlist, 'centlist' => $centlist, 'centyj' => $centyj, 'musellist' => $musellist); $str .= ShowTplTemp($Temp, $var); return $str; }
function NewsPicLb() { global $msql; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $ord = $GLOBALS["PLUSVARS"]["ord"]; $sc = $GLOBALS["PLUSVARS"]["sc"]; $showtj = $GLOBALS["PLUSVARS"]["showtj"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $catid = $GLOBALS["PLUSVARS"]["catid"]; $projid = $GLOBALS["PLUSVARS"]["projid"]; $tags = $GLOBALS["PLUSVARS"]["tags"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $w = $GLOBALS["PLUSVARS"]["w"]; $h = $GLOBALS["PLUSVARS"]["h"]; //默认条件 $scl = " iffb='1' and catid!='0' and src!='' "; if ($showtj != "" && $showtj != "0") { $scl .= " and tj='1' "; } //显示分类规则:如果后台不指定分类,则显示当前所在分类,否则不限分类 if ($catid != 0 && $catid != "") { $catid = fmpath($catid); $scl .= " and catpath regexp '{$catid}' "; } //匹配专题 if ($projid != 0 && $projid != "") { $projid = fmpath($projid); $scl .= " and proj regexp '{$projid}' "; } //判断匹配标签 if ($tags != "") { $tags = $tags . ","; $scl .= " and tags regexp '{$tags}' "; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; $h1 = $h - 22; $p = 1; $msql->query("select * from {P}_news_con where {$scl} order by {$ord} {$sc} limit 0,{$shownums}"); while ($msql->next_record()) { $id = $msql->f('id'); $src = $msql->f('src'); $title = $msql->f('title'); if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "news/html/" . $id . ".html")) { $url = ROOTPATH . "news/html/" . $id . ".html"; } else { $url = ROOTPATH . "news/html/?" . $id . ".html"; } if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } $src = ROOTPATH . $src; if ($p == 1) { $pic = $src; $purl = $url; $ptitle = $title; } else { $pic .= "|" . $src; $purl .= "|" . $url; $ptitle .= "|" . $title; } $p++; } $var = array('ptitle' => $ptitle, 'pic' => $pic, 'purl' => $purl, 'w' => $w, 'h' => $h, 'h1' => $h1); $str .= ShowTplTemp($TempArr["end"], $var); return $str; }
function PhotoTwoClass() { global $msql, $fsql, $tsql; $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' "; $subscl = " and tj='1' "; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; $msql->query("select * from {P}_photo_cat where {$scl} order by xuhao"); while ($msql->next_record()) { $catid = $msql->f("catid"); $cat = $msql->f("cat"); $catpath = $msql->f("catpath"); $ifchannel = $msql->f('ifchannel'); if ($ifchannel == "1") { $toplink = ROOTPATH . "photo/class/" . $catid . "/"; } else { if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "photo/class/" . $catid . ".html")) { $toplink = ROOTPATH . "photo/class/" . $catid . ".html"; } else { $toplink = ROOTPATH . "photo/class/?" . $catid . ".html"; } } $tsql->query("select count(id) from {P}_photo_con where iffb='1' and catid!='0' and catpath regexp '" . fmpath($catpath) . "'"); if ($tsql->next_record()) { $topcount = $tsql->f('count(id)'); } $sublinkstr = ""; $fsql->query("select * from {P}_photo_cat where pid='{$catid}' {$subscl} order by xuhao"); while ($fsql->next_record()) { $scatid = $fsql->f("catid"); $scat = $fsql->f("cat"); $scatpath = $fsql->f("catpath"); $sifchannel = $fsql->f('ifchannel'); if ($sifchannel == "1") { $slink = ROOTPATH . "photo/class/" . $scatid . "/"; } else { if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "photo/class/" . $scatid . ".html")) { $slink = ROOTPATH . "photo/class/" . $scatid . ".html"; } else { $slink = ROOTPATH . "photo/class/?" . $scatid . ".html"; } } $tsql->query("select count(id) from {P}_photo_con where iffb='1' and catid!='0' and catpath regexp '" . fmpath($scatpath) . "'"); if ($tsql->next_record()) { $subcount = $tsql->f('count(id)'); } $substr = str_replace("{#slink#}", $slink, $TempArr["list"]); $substr = str_replace("{#target#}", $target, $substr); $substr = str_replace("{#scat#}", $scat, $substr); $substr = str_replace("{#subcount#}", $subcount, $substr); $sublinkstr .= $substr; } $var = array('toplink' => $toplink, 'cat' => $cat, 'topcount' => $topcount, 'sublinkstr' => $sublinkstr, 'target' => $target); $str .= ShowTplTemp($TempArr["menu"], $var); } $str .= $TempArr["end"]; return $str; }
function PhotoHot() { global $fsql, $msql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $showtj = $GLOBALS["PLUSVARS"]["showtj"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $target = $GLOBALS["PLUSVARS"]["target"]; $catid = $GLOBALS["PLUSVARS"]["catid"]; $projid = $GLOBALS["PLUSVARS"]["projid"]; $tags = $GLOBALS["PLUSVARS"]["tags"]; $pagename = $GLOBALS["PLUSVARS"]["pagename"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; //地址栏参数 if ($pagename == "query" && 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); //默认条件 $scl = " iffb='1' and catid!='0' "; if ($showtj != "" && $showtj != "0") { $scl .= " and tj='1' "; } //显示分类规则:如果后台不指定分类,则显示当前所在分类,否则不限分类 if ($catid != 0 && $catid != "") { $catid = fmpath($catid); $scl .= " and catpath regexp '{$catid}' "; } elseif ($nowcatid != 0 && $nowcatid != "") { $catid = fmpath($nowcatid); $scl .= " and catpath regexp '{$catid}' "; } //匹配专题 if ($projid != 0 && $projid != "") { $projid = fmpath($projid); $scl .= " and proj regexp '{$projid}' "; } //判断匹配标签 if ($tags != "") { $tags = $tags . ","; $scl .= " and tags regexp '{$tags}' "; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle, 'morelink' => $morelink); $str = ShowTplTemp($TempArr["start"], $var); $picnum = 1; $fsql->query("select * from {P}_photo_con where {$scl} order by cl desc limit 0,{$shownums}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $catpath = $fsql->f('catpath'); $dtime = $fsql->f('dtime'); $nowcatid = $fsql->f('catid'); $ifnew = $fsql->f('ifnew'); $ifred = $fsql->f('ifred'); $ifbold = $fsql->f('ifbold'); $author = $fsql->f('author'); $source = $fsql->f('source'); $cl = $fsql->f('cl'); $src = $fsql->f('src'); $cl = $fsql->f('cl'); $prop1 = $fsql->f('prop1'); $prop2 = $fsql->f('prop2'); $prop3 = $fsql->f('prop3'); $prop4 = $fsql->f('prop4'); $prop5 = $fsql->f('prop5'); $prop6 = $fsql->f('prop6'); $prop7 = $fsql->f('prop7'); $prop8 = $fsql->f('prop8'); $prop9 = $fsql->f('prop9'); $prop10 = $fsql->f('prop10'); $prop11 = $fsql->f('prop11'); $prop12 = $fsql->f('prop12'); $prop13 = $fsql->f('prop13'); $prop14 = $fsql->f('prop14'); $prop15 = $fsql->f('prop15'); $prop16 = $fsql->f('prop16'); $prop17 = $fsql->f('prop17'); $prop18 = $fsql->f('prop18'); $prop19 = $fsql->f('prop19'); $prop20 = $fsql->f('prop20'); $memo = $fsql->f('memo'); $mid = $fsql->f('memberid'); if ($mid > 0) { $memberurl = ROOTPATH . "member/home.php?mid=" . $mid; } else { $memberurl = "#"; } if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "photo/html/" . $id . ".html")) { $link = ROOTPATH . "photo/html/" . $id . ".html"; } else { $link = ROOTPATH . "photo/html/?" . $id . ".html"; } $dtime = date("m/d", $dtime); if ($ifbold == "1") { $bold = " style='font-weight:bold' "; } else { $bold = ""; } if ($ifred != "0") { $red = " style='color:" . $ifred . "' "; } else { $red = ""; } if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } if ($src == "") { $src = "photo/pics/nopic.gif"; } $src = ROOTPATH . $src; //模版标签解释 $var = array('title' => $title, 'memo' => $memo, 'dtime' => $dtime, 'red' => $red, 'bold' => $bold, 'link' => $link, 'target' => $target, 'author' => $author, 'memberurl' => $memberurl, 'source' => $source, 'cat' => $cat, 'src' => $src, 'cl' => $cl, 'picnum' => $picnum, 'downurl' => $downurl, 'fileurl' => $fileurl, 'downcount' => $downcount, 'prop1' => $prop1, 'prop2' => $prop2, 'prop3' => $prop3, 'prop4' => $prop4, 'prop5' => $prop5, 'prop6' => $prop6, 'prop7' => $prop7, 'prop8' => $prop8, 'prop9' => $prop9, 'prop10' => $prop10, 'prop11' => $prop11, 'prop12' => $prop12, 'prop13' => $prop13, 'prop14' => $prop14, 'prop15' => $prop15, 'prop16' => $prop16, 'prop17' => $prop17, 'prop18' => $prop18, 'prop19' => $prop19, 'prop20' => $prop20, 'propname1' => $propname1, 'propname2' => $propname2, 'propname3' => $propname3, 'propname4' => $propname4, 'propname5' => $propname5, 'propname6' => $propname6, 'propname7' => $propname7, 'propname8' => $propname8, 'propname9' => $propname9, 'propname10' => $propname10, 'propname11' => $propname11, 'propname12' => $propname12, 'propname13' => $propname13, 'propname14' => $propname14, 'propname15' => $propname15, 'propname16' => $propname16, 'propname17' => $propname17, 'propname18' => $propname18, 'propname19' => $propname19, 'propname20' => $propname20); $str .= ShowTplTemp($TempArr["list"], $var); $picnum++; } $str .= $TempArr["end"]; return $str; }
function ProductList() { global $fsql, $msql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $ord = $GLOBALS["PLUSVARS"]["ord"]; $sc = $GLOBALS["PLUSVARS"]["sc"]; $showtj = $GLOBALS["PLUSVARS"]["showtj"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $cutbody = $GLOBALS["PLUSVARS"]["cutbody"]; $target = $GLOBALS["PLUSVARS"]["target"]; $catid = $GLOBALS["PLUSVARS"]["catid"]; $projid = $GLOBALS["PLUSVARS"]["projid"]; $tags = $GLOBALS["PLUSVARS"]["tags"]; $pagename = $GLOBALS["PLUSVARS"]["pagename"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $picw = $GLOBALS["PLUSVARS"]["picw"]; $pich = $GLOBALS["PLUSVARS"]["pich"]; $fittype = $GLOBALS["PLUSVARS"]["fittype"]; //地址栏参数 if ($pagename == "query" && 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); //默认条件 $scl = " iffb='1' and catid!='0' "; if ($showtj != "" && $showtj != "0") { $scl .= " and tj='1' "; } //显示分类规则:如果后台不指定分类,则显示当前所在分类,否则不限分类 if ($catid != 0 && $catid != "") { $catid = fmpath($catid); $scl .= " and catpath regexp '{$catid}' "; } elseif ($nowcatid != 0 && $nowcatid != "") { $catid = fmpath($nowcatid); $scl .= " and catpath regexp '{$catid}' "; } //匹配专题 if ($projid != 0 && $projid != "") { $projid = fmpath($projid); $scl .= " and proj regexp '{$projid}' "; } //判断匹配标签 if ($tags != "") { $tags = $tags . ","; $scl .= " and tags regexp '{$tags}' "; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle, 'morelink' => $morelink); $str = ShowTplTemp($TempArr["start"], $var); $picnum = 1; $fsql->query("select * from {P}_product_con where {$scl} order by {$ord} {$sc} limit 0,{$shownums}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $catpath = $fsql->f('catpath'); $dtime = $fsql->f('dtime'); $nowcatid = $fsql->f('catid'); $ifnew = $fsql->f('ifnew'); $ifred = $fsql->f('ifred'); $ifbold = $fsql->f('ifbold'); $author = $fsql->f('author'); $source = $fsql->f('source'); $cl = $fsql->f('cl'); $src = $fsql->f('src'); $cl = $fsql->f('cl'); $prop1 = $fsql->f('prop1'); $prop2 = $fsql->f('prop2'); $prop3 = $fsql->f('prop3'); $prop4 = $fsql->f('prop4'); $prop5 = $fsql->f('prop5'); $prop6 = $fsql->f('prop6'); $prop7 = $fsql->f('prop7'); $prop8 = $fsql->f('prop8'); $prop9 = $fsql->f('prop9'); $prop10 = $fsql->f('prop10'); $prop11 = $fsql->f('prop11'); $prop12 = $fsql->f('prop12'); $prop13 = $fsql->f('prop13'); $prop14 = $fsql->f('prop14'); $prop15 = $fsql->f('prop15'); $prop16 = $fsql->f('prop16'); $prop17 = $fsql->f('prop17'); $prop18 = $fsql->f('prop18'); $prop19 = $fsql->f('prop19'); $prop20 = $fsql->f('prop20'); $memo = $fsql->f('memo'); if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "product/html/" . $id . ".html")) { $link = ROOTPATH . "product/html/" . $id . ".html"; } else { $link = ROOTPATH . "product/html/?" . $id . ".html"; } $dtime = date("Y-m-d", $dtime); if ($ifbold == "1") { $bold = " style='font-weight:bold' "; } else { $bold = ""; } if ($ifred != "0") { $red = " style='color:" . $ifred . "' "; } else { $red = ""; } if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } if ($cutbody != "0") { $memo = csubstr($memo, 0, $cutbody); } if ($src == "") { $src = "product/pics/nopic.gif"; } $src = ROOTPATH . $src; //参数列 $propstr = ""; $i = 1; $msql->query("select * from {P}_product_prop where catid='{$nowcatid}' order by xuhao"); while ($msql->next_record()) { $propname = $msql->f('propname'); $pn = "prop" . $i; $pstr = str_replace("{#propname#}", $propname, $TempArr["m1"]); $pstr = str_replace("{#prop#}", ${$pn}, $pstr); $propstr .= $pstr; $i++; } //模版标签解释 $var = array('title' => $title, 'memo' => $memo, 'propstr' => $propstr, 'dtime' => $dtime, 'red' => $red, 'bold' => $bold, 'link' => $link, 'target' => $target, 'author' => $author, 'source' => $source, 'cat' => $cat, 'src' => $src, 'picw' => $picw, 'pich' => $pich, 'cl' => $cl); $str .= ShowTplTemp($TempArr["list"], $var); $picnum++; } $var = array('fittype' => $fittype); $str .= ShowTplTemp($TempArr["end"], $var); return $str; }
<input name="tags[]" type="text" class="input" id="tags" value="" size="10" /></td> </tr> <tr> <td height="30" width="100" align="center" ><?php echo $strProductAddProj; ?> </td> <td height="30" ><?php $catstr .= "<SCRIPT language=javascript src='js/multicat.js'></SCRIPT>"; $catstr .= "<table cellspacing=0 cellpadding=0><tr><td ><select style='WIDTH: 239px;font-size:12px;' multiple size=5 name=spe_funct>"; $fsql->query("select * from {P}_product_proj order by id desc"); while ($fsql->next_record()) { $projid = $fsql->f("id"); $project = $fsql->f("project"); $NowPath = fmpath($projid); $catstr .= "<option value=" . $NowPath . ">" . $project . "</option>"; $ppcat = ""; } $catstr .= "</select></td><td width=20>\r\n<input style='width:20px;height=37px;font-size:12px;border:1px outset;' onClick=\"JavaScript:AddItem('spe_funct', 'spe_selec[]')\" type=button value='+' name='Input'>\r\n<input style='width:20px;height=37px;font-size:12px;border:1px outset;' onClick=\"JavaScript:DelItem('spe_selec[]')\" type=button value='-' name='Input'>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t <select style='WIDTH: 239px;font-size:12px' multiple size=5 name=spe_selec[]>"; $catstr .= "</select></td><td valign=bottom></td><td width=20 align=center valign='bottom'></td></tr></table>"; echo $catstr; ?> </td> </tr> </table> </div> <div class="adminsubmit">
function DownQuery() { global $fsql, $msql, $strDownperson; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $target = $GLOBALS["PLUSVARS"]["target"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; //地址栏参数 if (strstr($_SERVER["QUERY_STRING"], ".html")) { $Arr = explode(".html", $_SERVER["QUERY_STRING"]); $catid = $Arr[0]; } elseif ($_GET["catid"] > 0) { $catid = $_GET["catid"]; } else { $catid = 0; } $key = $_GET["key"]; $showtj = $_GET["showtj"]; $page = $_GET["page"]; $myord = $_GET["myord"]; $myshownums = $_GET["myshownums"]; $memberid = $_GET["memberid"]; $showtag = $_GET["showtag"]; if ($myord == "") { $myord = "dtime"; } if ($myshownums != "" && $myshownums != "0") { $shownums = $myshownums; } //积分名称 $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'); } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; $scl = " iffb='1' and catid!='0' "; if ($catid != "0" && $catid != "") { $fmdpath = fmpath($catid); $scl .= " and catpath regexp '{$fmdpath}' "; } if ($showtj != "" && $showtj != "all") { $scl .= " and tj='{$showtj}' "; } if ($memberid != "" && $memberid != "all") { $scl .= " and memberid='{$memberid}' "; } if ($key != "") { $scl .= " and (title regexp '{$key}' or body regexp '{$key}') "; } if ($showtag != "") { $scl .= " and tags regexp '{$showtag}' "; } include ROOTPATH . "includes/pages.inc.php"; $pages = new pages(); $totalnums = TblCount("_down_con", "id", $scl); $pages->setvar(array("catid" => $catid, "myord" => $myord, "myshownums" => $myshownums, "showtj" => $showtj, "author" => $author, "key" => $key)); $pages->set($shownums, $totalnums); $pagelimit = $pages->limit(); $fsql->query("select * from {P}_down_con where {$scl} order by {$myord} desc limit {$pagelimit}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $catid = $fsql->f('catid'); $catpath = $fsql->f('catpath'); $dtime = $fsql->f('dtime'); $nowcatid = $fsql->f('catid'); $ifbold = $fsql->f('ifbold'); $ifred = $fsql->f('ifred'); $author = $fsql->f('author'); $source = $fsql->f('source'); $type = $fsql->f('type'); $src = $fsql->f('src'); $cl = $fsql->f('cl'); $fileurl = $fsql->f('fileurl'); $downcount = $fsql->f('downcount'); $prop1 = $fsql->f('prop1'); $prop2 = $fsql->f('prop2'); $prop3 = $fsql->f('prop3'); $prop4 = $fsql->f('prop4'); $prop5 = $fsql->f('prop5'); $prop6 = $fsql->f('prop6'); $prop7 = $fsql->f('prop7'); $prop8 = $fsql->f('prop8'); $prop9 = $fsql->f('prop9'); $prop10 = $fsql->f('prop10'); $prop11 = $fsql->f('prop11'); $prop12 = $fsql->f('prop12'); $prop13 = $fsql->f('prop13'); $prop14 = $fsql->f('prop14'); $prop15 = $fsql->f('prop15'); $prop16 = $fsql->f('prop16'); $prop17 = $fsql->f('prop17'); $prop18 = $fsql->f('prop18'); $prop19 = $fsql->f('prop19'); $prop20 = $fsql->f('prop20'); $memo = $fsql->f('memo'); $downcent = $fsql->f('downcent'); $downcentid = $fsql->f('downcentid'); $centincome = $fsql->f('centincome'); $dtime = date("Y-m-d", $dtime); if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "down/html/" . $id . ".html")) { $link = ROOTPATH . "down/html/" . $id . ".html"; } else { $link = ROOTPATH . "down/html/?" . $id . ".html"; } if ($ifbold == "1") { $bold = " style='font-weight:bold' "; } else { $bold = ""; } if ($ifred != "0") { $red = " style='color:" . $ifred . "' "; } else { $red = ""; } if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } //参数列 $i = 1; $msql->query("select * from {P}_down_prop where catid='{$catid}' order by xuhao"); while ($msql->next_record()) { $pn = "propname" . $i; ${$pn} = $msql->f('propname'); $i++; } //分类树 $arr = explode(":", $catpath); if ($catpath == "") { $catstr = $strDownperson; } else { $catstr = ""; for ($i = 0; $i < sizeof($arr); $i++) { if ($arr[$i] != "" && $arr[$i] != "0") { $msql->query("select cat from {P}_down_cat where catid='" . intval($arr[$i]) . "'"); if ($msql->next_record()) { $cat = $msql->f('cat'); $catstr .= $cat . ">"; } } } $catstr = substr($catstr, 0, -4); } //交易积分 $cenv = "centname" . $downcentid; $centname = ${$cenv}; $var = array('title' => $title, 'dtime' => $dtime, 'red' => $red, 'author' => $author, 'source' => $source, 'cat' => $cat, 'src' => $src, 'cl' => $cl, 'catstr' => $catstr, 'fileurl' => $fileurl, 'downcount' => $downcount, 'link' => $link, 'target' => $target, 'centname' => $centname, 'downcent' => $downcent, 'centincome' => $centincome, 'memo' => $memo, 'bold' => $bold, 'prop1' => $prop1, 'prop2' => $prop2, 'prop3' => $prop3, 'prop4' => $prop4, 'prop5' => $prop5, 'prop6' => $prop6, 'prop7' => $prop7, 'prop8' => $prop8, 'prop9' => $prop9, 'prop10' => $prop10, 'prop11' => $prop11, 'prop12' => $prop12, 'prop13' => $prop13, 'prop14' => $prop14, 'prop15' => $prop15, 'prop16' => $prop16, 'prop17' => $prop17, 'prop18' => $prop18, 'prop19' => $prop19, 'prop20' => $prop20, 'propname1' => $propname1, 'propname2' => $propname2, 'propname3' => $propname3, 'propname4' => $propname4, 'propname5' => $propname5, 'propname6' => $propname6, 'propname7' => $propname7, 'propname8' => $propname8, 'propname9' => $propname9, 'propname10' => $propname10, 'propname11' => $propname11, 'propname12' => $propname12, 'propname13' => $propname13, 'propname14' => $propname14, 'propname15' => $propname15, 'propname16' => $propname16, 'propname17' => $propname17, 'propname18' => $propname18, 'propname19' => $propname19, 'propname20' => $propname20); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; $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($str, $var); return $str; }
function PhotoGl() { global $fsql, $tsql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $memberid = $_COOKIE["MEMBERID"]; $memberid = htmlspecialchars($memberid); $showcatid = htmlspecialchars($_GET["showcatid"]); $shownum = htmlspecialchars($_GET["shownum"]); $showpcatid = htmlspecialchars($_GET["showpcatid"]); $key = htmlspecialchars($_GET["key"]); $page = htmlspecialchars($_GET["page"]); $step = htmlspecialchars($_GET["step"]); if ($step == "update") { $id = $_GET["id"]; $now = time(); $fsql->query("update {P}_photo_con set uptime='{$now}' where id='{$id}' and memberid='{$memberid}'"); } if ($step == "del") { $id = $_GET["id"]; //删除原图 $fsql->query("select src from {P}_photo_con where memberid='{$memberid}' and id='{$id}'"); if ($fsql->next_record()) { $oldsrc = $fsql->f('src'); if (file_exists(ROOTPATH . $oldsrc) && $oldsrc != "" && !strstr($oldsrc, "../")) { unlink(ROOTPATH . $oldsrc); } $candel = "yes"; } else { $candel = "no"; } if ($candel == "yes") { //删除组图 $fsql->query("select src from {P}_photo_pages where photoid='{$id}'"); while ($fsql->next_record()) { $oldsrc = $fsql->f('src'); if (file_exists(ROOTPATH . $oldsrc) && $oldsrc != "" && !strstr($oldsrc, "../")) { unlink(ROOTPATH . $oldsrc); } } $fsql->query("delete from {P}_photo_pages where photoid='{$id}'"); } $fsql->query("delete from {P}_photo_con where id='{$id}' and memberid='{$memberid}'"); } //模板解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); //自定义分类 $fsql->query("select * from {P}_photo_pcat where memberid='{$memberid}' order by xuhao"); while ($fsql->next_record()) { $pcatid = $fsql->f("catid"); $pcat = $fsql->f("cat"); if ($showpcatid == $pcatid) { $pcatlist .= "<option value='" . $pcatid . "' selected>" . $pcat . "</option>"; } else { $pcatlist .= "<option value='" . $pcatid . "'>" . $pcat . "</option>"; } } //图片分类 $fsql->query("select * from {P}_photo_cat order by catpath"); while ($fsql->next_record()) { $lpid = $fsql->f("pid"); $lcatid = $fsql->f("catid"); $cat = $fsql->f("cat"); $catpath = $fsql->f("catpath"); $lcatpath = explode(":", $catpath); for ($i = 0; $i < sizeof($lcatpath) - 2; $i++) { $tsql->query("select catid,cat from {P}_photo_cat where catid='{$lcatpath[$i]}'"); if ($tsql->next_record()) { $ncatid = $tsql->f('cat'); $ncat = $tsql->f('cat'); $ppcat .= $ncat . "/"; } } if ($showcatid == $lcatid) { $catlist .= "<option value='" . $lcatid . "' selected>" . $ppcat . $cat . "</option>"; } else { $catlist .= "<option value='" . $lcatid . "'>" . $ppcat . $cat . "</option>"; } $ppcat = ""; } $var = array('catlist' => $catlist, 'pcatlist' => $pcatlist); $str = ShowTplTemp($TempArr["start"], $var); $scl = " memberid='{$memberid}' "; if ($showcatid != "" && $showcatid != "0") { $fmdpath = fmpath($showcatid); $scl .= " and catpath regexp '{$fmdpath}' "; } if ($showpcatid != "" && $showpcatid != "0") { $scl .= " and pcatid ='{$showpcatid}' "; } if ($key != "") { $scl .= " and (title regexp '{$key}' or body regexp '{$key}') "; } if ($shownum == "") { $shownum = "10"; } include ROOTPATH . "includes/pages.inc.php"; $pages = new pages(); $totalnums = TblCount("_photo_con", "id", $scl); $pages->setvar(array("key" => $key, "shownum" => $shownum, "showcatid" => $showcatid, "showpcatid" => $showpcatid)); $pages->set($shownum, $totalnums); $pagelimit = $pages->limit(); $fsql->query("select * from {P}_photo_con where {$scl} order by uptime desc limit {$pagelimit}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $dtime = $fsql->f('dtime'); $src = $fsql->f('src'); $uptime = $fsql->f('uptime'); $iffb = $fsql->f('iffb'); $dtime = date("Y-m-d", $dtime); $uptime = date("Y-m-d", $uptime); if ($iffb == "1") { $check = "<img src='" . ROOTPATH . "photo/templates/images/yes.gif'>"; } else { $check = "<img src='" . ROOTPATH . "photo/templates/images/no.gif'>"; } if ($src != "") { $icon = "image.gif"; $src = ROOTPATH . $src; } else { $icon = "noimage.gif"; } $link = ROOTPATH . "photo/html/?" . $id . ".html"; $var = array('page' => $page, 'title' => $title, 'dtime' => $dtime, 'src' => $src, 'icon' => $icon, 'uptime' => $uptime, 'check' => $check, 'target' => "_blank", 'link' => $link, 'id' => $id); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; $pagesinfo = $pages->ShowNow(); $var = array('key' => $key, 'showcatid' => $showcatid, 'shownum' => $shownum, 'showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums); $str = ShowTplTemp($str, $var); return $str; }
function NewsPicRollx3() { global $fsql, $msql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $showtj = $GLOBALS["PLUSVARS"]["showtj"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $cutbody = $GLOBALS["PLUSVARS"]["cutbody"]; $target = $GLOBALS["PLUSVARS"]["target"]; $catid = $GLOBALS["PLUSVARS"]["catid"]; $projid = $GLOBALS["PLUSVARS"]["projid"]; $tags = $GLOBALS["PLUSVARS"]["tags"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $tempcolor = $GLOBALS["PLUSVARS"]["tempcolor"]; //本插件固定3张图片 $shownums = 3; //默认条件 $scl = " iffb='1' and src!='' and catid!='0' "; if ($showtj != "" && $showtj != "0") { $scl .= " and tj='1' "; } //显示分类规则:如果后台不指定分类,则显示当前所在分类,否则不限分类 if ($catid != 0 && $catid != "") { $catid = fmpath($catid); $scl .= " and catpath regexp '{$catid}' "; } //匹配专题 if ($projid != 0 && $projid != "") { $projid = fmpath($projid); $scl .= " and proj regexp '{$projid}' "; } //判断匹配标签 if ($tags != "") { $tags = $tags . ","; $scl .= " and tags regexp '{$tags}' "; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle, 'tempcolor' => $tempcolor); $str = ShowTplTemp($TempArr["start"], $var); $picnum = 1; $fsql->query("select * from {P}_news_con where {$scl} order by uptime desc limit 0,{$shownums}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $catpath = $fsql->f('catpath'); $dtime = $fsql->f('dtime'); $nowcatid = $fsql->f('catid'); $ifnew = $fsql->f('ifnew'); $ifred = $fsql->f('ifred'); $ifbold = $fsql->f('ifbold'); $author = $fsql->f('author'); $source = $fsql->f('source'); $cl = $fsql->f('cl'); $src = $fsql->f('src'); $memo = $fsql->f('memo'); if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "news/html/" . $id . ".html")) { $link = ROOTPATH . "news/html/" . $id . ".html"; } else { $link = ROOTPATH . "news/html/?" . $id . ".html"; } if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } if ($cutbody != "0") { $memo = csubstr($memo, 0, $cutbody); } if ($src == "") { $src = "news/pics/nopic.gif"; } $src = ROOTPATH . $src; //模版标签解释 $var = array('title' => $title, 'memo' => $memo, 'dtime' => $dtime, 'red' => $red, 'bold' => $bold, 'link' => $link, 'target' => $target, 'author' => $author, 'source' => $source, 'cat' => $cat, 'src' => $src, 'cl' => $cl, 'picnum' => $picnum); $str .= ShowTplTemp($TempArr["list"], $var); $picnum++; } $str .= $TempArr["end"]; return $str; }
echo $strAdminTitle; ?> </title> <script type="text/javascript" src="../../base/js/base.js"></script> <script type="text/javascript" src="../../base/js/form.js"></script> <script type="text/javascript" src="../../base/js/blockui.js"></script> <script type="text/javascript" src="js/news.js"></script> </head> <body> <?php $step = $_REQUEST["step"]; if ($step == "del") { $id = $_GET["id"]; $fmpath = fmpath($id) . ":"; $msql->query("select id from {P}_news_con where proj regexp '{$fmpath}' "); if ($msql->next_record()) { err($strProjNTC5, "", ""); exit; } $msql->query("select folder from {P}_news_proj where id='{$id}'"); if ($msql->next_record()) { $delfolder = $msql->f('folder'); } else { err($strProjNTC6, "", ""); exit; } $pagename = "proj_" . $delfolder; //删除页面记录 $msql->query("delete from {P}_base_pageset where coltype='news' and pagename='{$pagename}'");
function PhotoModify() { global $msql, $fsql, $tsql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; //模版解释 $Temp = LoadTemp($tempname); $id = $_REQUEST["id"]; $id = htmlspecialchars($id); $memberid = $_COOKIE["MEMBERID"]; $memberid = htmlspecialchars($memberid); $msql->query("select * from {P}_photo_con where id='{$id}' and memberid='{$memberid}'"); if ($msql->next_record()) { $catid = $msql->f('catid'); $mypcatid = $msql->f('pcatid'); $title = $msql->f('title'); $src = $msql->f('src'); $author = $msql->f('author'); $source = $msql->f('source'); $memo = $msql->f('memo'); $tags = $msql->f('tags'); $proj = $msql->f('proj'); } else { return "Invalied ID"; } if ($src != "") { $icon = "image.gif"; $src = ROOTPATH . $src; } else { $icon = "noimage.gif"; } //个人分类 $fsql->query("select * from {P}_photo_pcat where memberid='{$memberid}' order by xuhao"); while ($fsql->next_record()) { $pcatid = $fsql->f("catid"); $pcat = $fsql->f("cat"); if ($mypcatid == $pcatid) { $pcatlist .= "<option value='" . $pcatid . "' selected>" . $pcat . "</option>"; } else { $pcatlist .= "<option value='" . $pcatid . "'>" . $pcat . "</option>"; } } //获取公共分类授权 $secureset = SecureClass("156"); //公共分类 $fsql->query("select * from {P}_photo_cat order by catpath"); while ($fsql->next_record()) { $lpid = $fsql->f("pid"); $lcatid = $fsql->f("catid"); $cat = $fsql->f("cat"); $catpath = $fsql->f("catpath"); $lcatpath = explode(":", $catpath); //当主分类有授权时读取下级分类 if (strstr($secureset, ":" . intval($lcatpath[0]) . ":")) { for ($i = 0; $i < sizeof($lcatpath) - 2; $i++) { $tsql->query("select catid,cat from {P}_photo_cat where catid='{$lcatpath[$i]}'"); if ($tsql->next_record()) { $ncatid = $tsql->f('cat'); $ncat = $tsql->f('cat'); $ppcat .= $ncat . "/"; } } if ($catid == $lcatid) { $catlist .= "<option value='" . $lcatid . "' selected>" . $ppcat . $cat . "</option>"; } else { $catlist .= "<option value='" . $lcatid . "'>" . $ppcat . $cat . "</option>"; } $ppcat = ""; } } //标签处理 $tags = explode(",", $tags); //专题 $fsql->query("select * from {P}_photo_proj order by id desc"); while ($fsql->next_record()) { $projid = $fsql->f("id"); $project = $fsql->f("project"); $NowPath = fmpath($projid); $musellist .= "<option value=" . $NowPath . ">" . $project . "</option>"; } //已选专题 $arrs = explode(":", $proj); for ($k = 0; $k < sizeof($arrs) - 1; $k++) { $projid = $arrs[$k] + 0; $tsql->query("select project from {P}_photo_proj where id='{$projid}'"); if ($tsql->next_record()) { $project = $tsql->f('project'); } $munowlist .= "<option value=" . $arrs[$k] . ">" . $project . "</option>"; } //模版解释 $var = array('catlist' => $catlist, 'pcatlist' => $pcatlist, 'author' => $author, 'source' => $source, 'memo' => $memo, 'icon' => $icon, 'src' => $src, 'title' => $title, 'id' => $id, 'musellist' => $musellist, 'munowlist' => $munowlist, 'tags0' => $tags[0], 'tags1' => $tags[1], 'tags2' => $tags[2], 'tags3' => $tags[3], 'tags4' => $tags[4]); $str = ShowTplTemp($Temp, $var); return $str; }
function ProductQuery() { global $fsql, $msql, $tsql; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $target = $GLOBALS["PLUSVARS"]["target"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $picw = $GLOBALS["PLUSVARS"]["picw"]; $pich = $GLOBALS["PLUSVARS"]["pich"]; $fittype = $GLOBALS["PLUSVARS"]["fittype"]; $cutbody = $GLOBALS["PLUSVARS"]["cutbody"]; //地址栏参数 if (strstr($_SERVER["QUERY_STRING"], ".html")) { $Arr = explode(".html", $_SERVER["QUERY_STRING"]); $catid = $Arr[0]; } elseif ($_GET["catid"] > 0) { $catid = $_GET["catid"]; } else { $catid = 0; } $key = $_GET["key"]; $showtj = $_GET["showtj"]; $page = $_GET["page"]; $myord = $_GET["myord"]; $myshownums = $_GET["myshownums"]; $memberid = $_GET["memberid"]; $showtag = $_GET["showtag"]; if ($myord == "") { $myord = "uptime"; } if ($myshownums != "" && $myshownums != "0") { $shownums = $myshownums; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; $scl = " iffb='1' and catid!='0' "; if ($catid != "0" && $catid != "") { $fmdpath = fmpath($catid); $scl .= " and catpath regexp '{$fmdpath}' "; } if ($showtj != "" && $showtj != "all") { $scl .= " and tj='{$showtj}' "; } if ($memberid != "" && $memberid != "all") { $scl .= " and memberid='{$memberid}' "; } if ($key != "") { $scl .= " and (title regexp '{$key}' or memo regexp '{$key}') "; } if ($showtag != "") { $scl .= " and tags regexp '{$showtag}' "; } include ROOTPATH . "includes/pages.inc.php"; $pages = new pages(); $totalnums = TblCount("_product_con", "id", $scl); $pages->setvar(array("catid" => $catid, "myord" => $myord, "myshownums" => $myshownums, "showtj" => $showtj, "author" => $author, "key" => $key)); $pages->set($shownums, $totalnums); $pagelimit = $pages->limit(); $fsql->query("select * from {P}_product_con where {$scl} order by {$myord} desc limit {$pagelimit}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $catid = $fsql->f('catid'); $catpath = $fsql->f('catpath'); $dtime = $fsql->f('dtime'); $nowcatid = $fsql->f('catid'); $ifbold = $fsql->f('ifbold'); $ifred = $fsql->f('ifred'); $author = $fsql->f('author'); $source = $fsql->f('source'); $type = $fsql->f('type'); $src = $fsql->f('src'); $cl = $fsql->f('cl'); $prop1 = $fsql->f('prop1'); $prop2 = $fsql->f('prop2'); $prop3 = $fsql->f('prop3'); $prop4 = $fsql->f('prop4'); $prop5 = $fsql->f('prop5'); $prop6 = $fsql->f('prop6'); $prop7 = $fsql->f('prop7'); $prop8 = $fsql->f('prop8'); $prop9 = $fsql->f('prop9'); $prop10 = $fsql->f('prop10'); $prop11 = $fsql->f('prop11'); $prop12 = $fsql->f('prop12'); $prop13 = $fsql->f('prop13'); $prop14 = $fsql->f('prop14'); $prop15 = $fsql->f('prop15'); $prop16 = $fsql->f('prop16'); $prop17 = $fsql->f('prop17'); $prop18 = $fsql->f('prop18'); $prop19 = $fsql->f('prop19'); $prop20 = $fsql->f('prop20'); $memo = $fsql->f('memo'); $dtime = date("Y-m-d", $dtime); if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "product/html/" . $id . ".html")) { $link = ROOTPATH . "product/html/" . $id . ".html"; } else { $link = ROOTPATH . "product/html/?" . $id . ".html"; } if ($ifbold == "1") { $bold = " style='font-weight:bold' "; } else { $bold = ""; } if ($ifred != "0") { $red = " style='color:" . $ifred . "' "; } else { $red = ""; } if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } if ($cutbody != "0") { $memo = csubstr($memo, 0, $cutbody); } if ($src == "") { $src = "product/pics/nopic.gif"; } $src = ROOTPATH . $src; $tsql->query("select cat from {P}_product_cat where catid='{$catid}'"); if ($tsql->next_record()) { $cat = $tsql->f('cat'); } //参数列 $propstr = ""; $i = 1; $msql->query("select * from {P}_product_prop where catid='{$catid}' order by xuhao"); while ($msql->next_record()) { $propname = $msql->f('propname'); $pn = "prop" . $i; $pstr = str_replace("{#propname#}", $propname, $TempArr["m1"]); $pstr = str_replace("{#prop#}", ${$pn}, $pstr); $propstr .= $pstr; $i++; } $var = array('cat' => $cat, 'id' => $id, 'title' => $title, 'propstr' => $propstr, 'dtime' => $dtime, 'red' => $red, 'author' => $author, 'source' => $source, 'src' => $src, 'cl' => $cl, 'link' => $link, 'target' => $target, 'memo' => $memo, 'picw' => $picw, 'pich' => $pich, 'bold' => $bold); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; $pagesinfo = $pages->ShowNow(); $var = array('fittype' => $fittype, 'showpages' => $pages->output(1), 'pagestotal' => $pagesinfo["total"], 'pagesnow' => $pagesinfo["now"], 'pagesshownum' => $pagesinfo["shownum"], 'pagesfrom' => $pagesinfo["from"], 'pagesto' => $pagesinfo["to"], 'totalnums' => $totalnums); $str = ShowTplTemp($str, $var); return $str; }
function NewsQuery() { global $fsql, $msql; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $target = $GLOBALS["PLUSVARS"]["target"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; //µØÖ·À¸²ÎÊý if (strstr($_SERVER["QUERY_STRING"], ".html")) { $Arr = explode(".html", $_SERVER["QUERY_STRING"]); $catid = $Arr[0]; } elseif ($_GET["catid"] > 0) { $catid = $_GET["catid"]; } else { $catid = 0; } $key = $_GET["key"]; $showtj = $_GET["showtj"]; $page = $_GET["page"]; $myord = $_GET["myord"]; $myshownums = $_GET["myshownums"]; $memberid = $_GET["memberid"]; $showtag = $_GET["showtag"]; $showdate = $_GET["showdate"]; if ($myord == "") { $myord = "uptime"; } if ($myshownums != "" && $myshownums != "0") { $shownums = $myshownums; } //Ä£°æ½âÊÍ $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; //ĬÈÏÌõ¼þ $scl = " iffb='1' and catid!='0' "; if ($catid != "0" && $catid != "") { $fmdpath = fmpath($catid); $scl .= " and catpath regexp '{$fmdpath}' "; } if ($showtj != "" && $showtj != "all") { $scl .= " and tj='{$showtj}' "; } if ($memberid != "" && $memberid != "all") { $scl .= " and memberid='{$memberid}' "; } if ($key != "") { $scl .= " and (title regexp '{$key}' or body regexp '{$key}') "; } if ($showtag != "") { $scl .= " and tags regexp '{$showtag}' "; } if ($showdate != "" && strlen($showdate) == 8 && intval($showdate) > 19700101) { $timestart = mktime(0, 0, 0, substr($showdate, 4, 2), substr($showdate, 6, 2), substr($showdate, 0, 4)); $timeend = mktime(23, 59, 59, substr($showdate, 4, 2), substr($showdate, 6, 2), substr($showdate, 0, 4)); $scl .= " and dtime>{$timestart} and dtime<{$timeend} "; } include ROOTPATH . "includes/pages.inc.php"; $pages = new pages(); $totalnums = TblCount("_news_con", "id", $scl); $pages->setvar(array("catid" => $catid, "myord" => $myord, "myshownums" => $myshownums, "showtj" => $showtj, "showdate" => $showdate, "author" => $author, "key" => $key)); $pages->set($shownums, $totalnums); $pagelimit = $pages->limit(); $fsql->query("select * from {P}_news_con where {$scl} order by {$myord} desc limit {$pagelimit}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $catid = $fsql->f('catid'); $catpath = $fsql->f('catpath'); $dtime = $fsql->f('dtime'); $nowcatid = $fsql->f('catid'); $ifbold = $fsql->f('ifbold'); $ifred = $fsql->f('ifred'); $author = $fsql->f('author'); $source = $fsql->f('source'); $type = $fsql->f('type'); $src = $fsql->f('src'); $cl = $fsql->f('cl'); $fileurl = $fsql->f('fileurl'); $downcount = $fsql->f('downcount'); $prop1 = $fsql->f('prop1'); $prop2 = $fsql->f('prop2'); $prop3 = $fsql->f('prop3'); $prop4 = $fsql->f('prop4'); $prop5 = $fsql->f('prop5'); $prop6 = $fsql->f('prop6'); $prop7 = $fsql->f('prop7'); $prop8 = $fsql->f('prop8'); $prop9 = $fsql->f('prop9'); $prop10 = $fsql->f('prop10'); $prop11 = $fsql->f('prop11'); $prop12 = $fsql->f('prop12'); $prop13 = $fsql->f('prop13'); $prop14 = $fsql->f('prop14'); $prop15 = $fsql->f('prop15'); $prop16 = $fsql->f('prop16'); $prop17 = $fsql->f('prop17'); $prop18 = $fsql->f('prop18'); $prop19 = $fsql->f('prop19'); $prop20 = $fsql->f('prop20'); $memo = $fsql->f('memo'); $dtime = date("Y-m-d", $dtime); if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "news/html/" . $id . ".html")) { $link = ROOTPATH . "news/html/" . $id . ".html"; } else { $link = ROOTPATH . "news/html/?" . $id . ".html"; } if ($ifbold == "1") { $bold = " style='font-weight:bold' "; } else { $bold = ""; } if ($ifred != "0") { $red = " style='color:" . $ifred . "' "; } else { $red = ""; } if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } if ($src == "") { $src = "news/pics/nopic.gif"; } $src = ROOTPATH . $src; $downurl = ROOTPATH . "news/download.php?id=" . $id; $i = 1; $msql->query("select * from {P}_news_prop where catid='{$catid}' order by xuhao"); while ($msql->next_record()) { $pn = "propname" . $i; ${$pn} = $msql->f('propname'); $i++; } $var = array('title' => $title, 'dtime' => $dtime, 'red' => $red, 'author' => $author, 'source' => $source, 'src' => $src, 'cl' => $cl, 'downurl' => $downurl, 'fileurl' => $fileurl, 'downcount' => $downcount, 'link' => $link, 'target' => $target, 'memo' => $memo, 'bold' => $bold, 'prop1' => $prop1, 'prop2' => $prop2, 'prop3' => $prop3, 'prop4' => $prop4, 'prop5' => $prop5, 'prop6' => $prop6, 'prop7' => $prop7, 'prop8' => $prop8, 'prop9' => $prop9, 'prop10' => $prop10, 'prop11' => $prop11, 'prop12' => $prop12, 'prop13' => $prop13, 'prop14' => $prop14, 'prop15' => $prop15, 'prop16' => $prop16, 'prop17' => $prop17, 'prop18' => $prop18, 'prop19' => $prop19, 'prop20' => $prop20, 'propname1' => $propname1, 'propname2' => $propname2, 'propname3' => $propname3, 'propname4' => $propname4, 'propname5' => $propname5, 'propname6' => $propname6, 'propname7' => $propname7, 'propname8' => $propname8, 'propname9' => $propname9, 'propname10' => $propname10, 'propname11' => $propname11, 'propname12' => $propname12, 'propname13' => $propname13, 'propname14' => $propname14, 'propname15' => $propname15, 'propname16' => $propname16, 'propname17' => $propname17, 'propname18' => $propname18, 'propname19' => $propname19, 'propname20' => $propname20); $str .= ShowTplTemp($TempArr["list"], $var); } $str .= $TempArr["end"]; $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($str, $var); return $str; }
function DownModify() { global $msql, $fsql, $tsql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; //模版解释 $Temp = LoadTemp($tempname); $id = $_REQUEST["id"]; $id = htmlspecialchars($id); $memberid = $_COOKIE["MEMBERID"]; $msql->query("select * from {P}_down_con where id='{$id}' and memberid='{$memberid}'"); if ($msql->next_record()) { $catid = $msql->f('catid'); $mypcatid = $msql->f('pcatid'); $title = $msql->f('title'); $body = $msql->f('body'); $fileurl = $msql->f('fileurl'); $author = $msql->f('author'); $source = $msql->f('source'); $memo = $msql->f('memo'); $tags = $msql->f('tags'); $proj = $msql->f('proj'); $downcent = $msql->f('downcent'); $downcentid = $msql->f('downcentid'); } else { return "Invalied ID"; } if ($src != "") { $icon = "image.gif"; $src = ROOTPATH . $src; } else { $icon = "noimage.gif"; } $body = htmlspecialchars($body); $body = Path2Url($body); //个人分类 $fsql->query("select * from {P}_down_pcat where memberid='{$memberid}' order by xuhao"); while ($fsql->next_record()) { $pcatid = $fsql->f("catid"); $pcat = $fsql->f("cat"); if ($mypcatid == $pcatid) { $pcatlist .= "<option value='" . $pcatid . "' selected>" . $pcat . "</option>"; } else { $pcatlist .= "<option value='" . $pcatid . "'>" . $pcat . "</option>"; } } //获取公共分类授权 $secureset = SecureClass("166"); //公共分类 $fsql->query("select * from {P}_down_cat order by catpath"); while ($fsql->next_record()) { $lpid = $fsql->f("pid"); $lcatid = $fsql->f("catid"); $cat = $fsql->f("cat"); $catpath = $fsql->f("catpath"); $lcatpath = explode(":", $catpath); //当主分类有授权时读取下级分类 if (strstr($secureset, ":" . intval($lcatpath[0]) . ":")) { for ($i = 0; $i < sizeof($lcatpath) - 2; $i++) { $tsql->query("select catid,cat from {P}_down_cat where catid='{$lcatpath[$i]}'"); if ($tsql->next_record()) { $ncatid = $tsql->f('cat'); $ncat = $tsql->f('cat'); $ppcat .= $ncat . "/"; } } if ($catid == $lcatid) { $catlist .= "<option value='" . $lcatid . "' selected>" . $ppcat . $cat . "</option>"; } else { $catlist .= "<option value='" . $lcatid . "'>" . $ppcat . $cat . "</option>"; } $ppcat = ""; } } //标签处理 $tags = explode(",", $tags); //专题 $fsql->query("select * from {P}_down_proj order by id desc"); while ($fsql->next_record()) { $projid = $fsql->f("id"); $project = $fsql->f("project"); $NowPath = fmpath($projid); $musellist .= "<option value=" . $NowPath . ">" . $project . "</option>"; } //已选专题 $arrs = explode(":", $proj); for ($k = 0; $k < sizeof($arrs) - 1; $k++) { $projid = $arrs[$k] + 0; $tsql->query("select project from {P}_down_proj where id='{$projid}'"); if ($tsql->next_record()) { $project = $tsql->f('project'); } $munowlist .= "<option value=" . $arrs[$k] . ">" . $project . "</option>"; } //积分名称 $defcentid = $GLOBALS["DOWNCONF"]["DefaultCentId"]; $centyj = $GLOBALS["DOWNCONF"]["CentYj"] * 100; if ($defcentid < 1 || $defcentid > 5) { $defcentid = "1"; } $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'); } $centstr = "centname" . $defcentid; $centlist = "<option value='" . $defcentid . "'>" . ${$centstr} . "</option>"; //模版解释 $var = array('catlist' => $catlist, 'pcatlist' => $pcatlist, 'author' => $author, 'source' => $source, 'memo' => $memo, 'icon' => $icon, 'fileurl' => $fileurl, 'title' => $title, 'id' => $id, 'musellist' => $musellist, 'munowlist' => $munowlist, 'tags0' => $tags[0], 'tags1' => $tags[1], 'tags2' => $tags[2], 'tags3' => $tags[3], 'tags4' => $tags[4], 'centlist' => $centlist, 'centyj' => $centyj, 'downcent' => $downcent, 'body' => $body); $str = ShowTplTemp($Temp, $var); return $str; }
function NewsGlobalQuery() { global $fsql, $msql; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $ord = $GLOBALS["PLUSVARS"]["ord"]; $sc = $GLOBALS["PLUSVARS"]["sc"]; $showtj = $GLOBALS["PLUSVARS"]["showtj"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $cutbody = $GLOBALS["PLUSVARS"]["cutbody"]; $target = $GLOBALS["PLUSVARS"]["target"]; $catid = $GLOBALS["PLUSVARS"]["catid"]; $projid = $GLOBALS["PLUSVARS"]["projid"]; $tags = $GLOBALS["PLUSVARS"]["tags"]; $pagename = $GLOBALS["PLUSVARS"]["pagename"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; //默认条件 $scl = " iffb='1' and catid!='0' "; if ($showtj != "" && $showtj != "0") { $scl .= " and tj='1' "; } //匹配所选分类 if ($catid != 0 && $catid != "") { $catid = fmpath($catid); $scl .= " and catpath regexp '{$catid}' "; } //匹配专题 if ($projid != 0 && $projid != "") { $projid = fmpath($projid); $scl .= " and proj regexp '{$projid}' "; } //判断匹配标签 if ($tags != "") { $tags = $tags . ","; $scl .= " and tags regexp '{$tags}' "; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; //翻页 include ROOTPATH . "includes/pages.inc.php"; $pages = new pages(); $totalnums = TblCount("_news_con", "id", $scl); $pages->setvar(array("key" => $key)); $pages->set($shownums, $totalnums); $pagelimit = $pages->limit(); $picnum = 1; $fsql->query("select * from {P}_news_con where {$scl} order by {$ord} {$sc} limit {$pagelimit}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $catpath = $fsql->f('catpath'); $dtime = $fsql->f('dtime'); $nowcatid = $fsql->f('catid'); $ifnew = $fsql->f('ifnew'); $ifred = $fsql->f('ifred'); $ifbold = $fsql->f('ifbold'); $author = $fsql->f('author'); $source = $fsql->f('source'); $cl = $fsql->f('cl'); $src = $fsql->f('src'); $cl = $fsql->f('cl'); $fileurl = $fsql->f('fileurl'); $downcount = $fsql->f('downcount'); $prop1 = $fsql->f('prop1'); $prop2 = $fsql->f('prop2'); $prop3 = $fsql->f('prop3'); $prop4 = $fsql->f('prop4'); $prop5 = $fsql->f('prop5'); $prop6 = $fsql->f('prop6'); $prop7 = $fsql->f('prop7'); $prop8 = $fsql->f('prop8'); $prop9 = $fsql->f('prop9'); $prop10 = $fsql->f('prop10'); $prop11 = $fsql->f('prop11'); $prop12 = $fsql->f('prop12'); $prop13 = $fsql->f('prop13'); $prop14 = $fsql->f('prop14'); $prop15 = $fsql->f('prop15'); $prop16 = $fsql->f('prop16'); $prop17 = $fsql->f('prop17'); $prop18 = $fsql->f('prop18'); $prop19 = $fsql->f('prop19'); $prop20 = $fsql->f('prop20'); $memo = $fsql->f('memo'); $mid = $fsql->f('memberid'); if ($mid > 0) { $memberurl = ROOTPATH . "member/home.php?mid=" . $mid; } else { $memberurl = "#"; } if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "news/html/" . $id . ".html")) { $link = ROOTPATH . "news/html/" . $id . ".html"; } else { $link = ROOTPATH . "news/html/?" . $id . ".html"; } $dtimey = date("Y-m-d", $dtime); $dtime = date("m/d", $dtime); if ($ifbold == "1") { $bold = " style='font-weight:bold' "; } else { $bold = ""; } if ($ifred != "0") { $red = " style='color:" . $ifred . "' "; } else { $red = ""; } if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } if ($cutbody != "0") { $memo = csubstr($memo, 0, $cutbody); } if ($src == "") { $src = "news/pics/nopic.gif"; } $src = ROOTPATH . $src; $downurl = ROOTPATH . "news/download.php?id=" . $id; //显示所属分类 $msql->query("select cat from {P}_news_cat where catid='{$nowcatid}'"); if ($msql->next_record()) { $cat = $msql->f('cat'); } //参数列 $i = 1; $msql->query("select * from {P}_news_prop where catid='{$nowcatid}' order by xuhao"); while ($msql->next_record()) { $pn = "propname" . $i; ${$pn} = $msql->f('propname'); $i++; } //模版标签解释 $var = array('title' => $title, 'memo' => $memo, 'dtime' => $dtime, 'dtimey' => $dtimey, 'red' => $red, 'bold' => $bold, 'link' => $link, 'target' => $target, 'author' => $author, 'source' => $source, 'cat' => $cat, 'src' => $src, 'cl' => $cl, 'memberurl' => $memberurl, 'picnum' => $picnum, 'downurl' => $downurl, 'fileurl' => $fileurl, 'downcount' => $downcount, 'prop1' => $prop1, 'prop2' => $prop2, 'prop3' => $prop3, 'prop4' => $prop4, 'prop5' => $prop5, 'prop6' => $prop6, 'prop7' => $prop7, 'prop8' => $prop8, 'prop9' => $prop9, 'prop10' => $prop10, 'prop11' => $prop11, 'prop12' => $prop12, 'prop13' => $prop13, 'prop14' => $prop14, 'prop15' => $prop15, 'prop16' => $prop16, 'prop17' => $prop17, 'prop18' => $prop18, 'prop19' => $prop19, 'prop20' => $prop20, 'propname1' => $propname1, 'propname2' => $propname2, 'propname3' => $propname3, 'propname4' => $propname4, 'propname5' => $propname5, 'propname6' => $propname6, 'propname7' => $propname7, 'propname8' => $propname8, 'propname9' => $propname9, 'propname10' => $propname10, 'propname11' => $propname11, 'propname12' => $propname12, 'propname13' => $propname13, 'propname14' => $propname14, 'propname15' => $propname15, 'propname16' => $propname16, 'propname17' => $propname17, 'propname18' => $propname18, 'propname19' => $propname19, 'propname20' => $propname20); $str .= ShowTplTemp($TempArr["list"], $var); $picnum++; } $str .= $TempArr["end"]; $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($str, $var); return $str; }
function DownGlobalQuery() { global $fsql, $msql; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $ord = $GLOBALS["PLUSVARS"]["ord"]; $sc = $GLOBALS["PLUSVARS"]["sc"]; $showtj = $GLOBALS["PLUSVARS"]["showtj"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $target = $GLOBALS["PLUSVARS"]["target"]; $catid = $GLOBALS["PLUSVARS"]["catid"]; $projid = $GLOBALS["PLUSVARS"]["projid"]; $tags = $GLOBALS["PLUSVARS"]["tags"]; $pagename = $GLOBALS["PLUSVARS"]["pagename"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; //ĬÈÏÌõ¼þ $scl = " iffb='1' and catid!='0' "; if ($showtj != "" && $showtj != "0") { $scl .= " and tj='1' "; } //Æ¥Åä·ÖÀà if ($catid != 0 && $catid != "") { $catid = fmpath($catid); $scl .= " and catpath regexp '{$catid}' "; } //Æ¥ÅäרÌâ if ($projid != 0 && $projid != "") { $projid = fmpath($projid); $scl .= " and proj regexp '{$projid}' "; } //ÅжÏÆ¥Åä±êÇ© if ($tags != "") { $tags = $tags . ","; $scl .= " and tags regexp '{$tags}' "; } //Ä£°æ½âÊÍ $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $str = $TempArr["start"]; //·Ò³ include ROOTPATH . "includes/pages.inc.php"; $pages = new pages(); $totalnums = TblCount("_down_con", "id", $scl); $pages->setvar(array("key" => $key)); $pages->set($shownums, $totalnums); $pagelimit = $pages->limit(); $picnum = 1; $fsql->query("select * from {P}_down_con where {$scl} order by {$ord} {$sc} limit {$pagelimit}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $catpath = $fsql->f('catpath'); $dtime = $fsql->f('dtime'); $nowcatid = $fsql->f('catid'); $ifnew = $fsql->f('ifnew'); $ifred = $fsql->f('ifred'); $ifbold = $fsql->f('ifbold'); $author = $fsql->f('author'); $source = $fsql->f('source'); $cl = $fsql->f('cl'); $fileurl = $fsql->f('fileurl'); $downcount = $fsql->f('downcount'); $prop1 = $fsql->f('prop1'); $prop2 = $fsql->f('prop2'); $prop3 = $fsql->f('prop3'); $prop4 = $fsql->f('prop4'); $prop5 = $fsql->f('prop5'); $prop6 = $fsql->f('prop6'); $prop7 = $fsql->f('prop7'); $prop8 = $fsql->f('prop8'); $prop9 = $fsql->f('prop9'); $prop10 = $fsql->f('prop10'); $prop11 = $fsql->f('prop11'); $prop12 = $fsql->f('prop12'); $prop13 = $fsql->f('prop13'); $prop14 = $fsql->f('prop14'); $prop15 = $fsql->f('prop15'); $prop16 = $fsql->f('prop16'); $prop17 = $fsql->f('prop17'); $prop18 = $fsql->f('prop18'); $prop19 = $fsql->f('prop19'); $prop20 = $fsql->f('prop20'); $memo = $fsql->f('memo'); if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "down/html/" . $id . ".html")) { $link = ROOTPATH . "down/html/" . $id . ".html"; } else { $link = ROOTPATH . "down/html/?" . $id . ".html"; } $dtime = date("Y-m-d H:i", $dtime); if ($ifbold == "1") { $bold = " style='font-weight:bold' "; } else { $bold = ""; } if ($ifred != "0") { $red = " style='color:" . $ifred . "' "; } else { $red = ""; } if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } //ÏÔʾËùÊô·ÖÀà $msql->query("select cat from {P}_down_cat where catid='{$nowcatid}'"); if ($msql->next_record()) { $cat = $msql->f('cat'); } //Ä£°æ±êÇ©½âÊÍ $var = array('title' => $title, 'memo' => $memo, 'dtime' => $dtime, 'red' => $red, 'bold' => $bold, 'link' => $link, 'target' => $target, 'author' => $author, 'source' => $source, 'cat' => $cat, 'cl' => $cl, 'fileurl' => $fileurl, 'downcount' => $downcount, 'prop1' => $prop1, 'prop2' => $prop2, 'prop3' => $prop3, 'prop4' => $prop4, 'prop5' => $prop5, 'prop6' => $prop6, 'prop7' => $prop7, 'prop8' => $prop8, 'prop9' => $prop9, 'prop10' => $prop10, 'prop11' => $prop11, 'prop12' => $prop12, 'prop13' => $prop13, 'prop14' => $prop14, 'prop15' => $prop15, 'prop16' => $prop16, 'prop17' => $prop17, 'prop18' => $prop18, 'prop19' => $prop19, 'prop20' => $prop20, 'propname1' => $propname1, 'propname2' => $propname2, 'propname3' => $propname3, 'propname4' => $propname4, 'propname5' => $propname5, 'propname6' => $propname6, 'propname7' => $propname7, 'propname8' => $propname8, 'propname9' => $propname9, 'propname10' => $propname10, 'propname11' => $propname11, 'propname12' => $propname12, 'propname13' => $propname13, 'propname14' => $propname14, 'propname15' => $propname15, 'propname16' => $propname16, 'propname17' => $propname17, 'propname18' => $propname18, 'propname19' => $propname19, 'propname20' => $propname20); $str .= ShowTplTemp($TempArr["list"], $var); $picnum++; } $str .= $TempArr["end"]; $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($str, $var); return $str; }
function PhotoCarousel() { global $fsql, $msql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $showtj = $GLOBALS["PLUSVARS"]["showtj"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $cutbody = $GLOBALS["PLUSVARS"]["cutbody"]; $target = $GLOBALS["PLUSVARS"]["target"]; $catid = $GLOBALS["PLUSVARS"]["catid"]; $projid = $GLOBALS["PLUSVARS"]["projid"]; $tags = $GLOBALS["PLUSVARS"]["tags"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $tempcolor = $GLOBALS["PLUSVARS"]["tempcolor"]; //本插件固定3张图片 $shownums = 6; //默认条件 $scl = " iffb='1' and catid!='0' "; if ($showtj != "" && $showtj != "0") { $scl .= " and tj='1' "; } //显示分类规则:如果后台不指定分类,则显示当前所在分类,否则不限分类 if ($catid != 0 && $catid != "") { $catid = fmpath($catid); $scl .= " and catpath regexp '{$catid}' "; } //匹配专题 if ($projid != 0 && $projid != "") { $projid = fmpath($projid); $scl .= " and proj regexp '{$projid}' "; } //判断匹配标签 if ($tags != "") { $tags = $tags . ","; $scl .= " and tags regexp '{$tags}' "; } //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle, 'tempcolor' => $tempcolor); $str = ShowTplTemp($TempArr["start"], $var); $fsql->query("select * from {P}_photo_con where {$scl} order by uptime desc limit 0,{$shownums}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $catpath = $fsql->f('catpath'); $dtime = $fsql->f('dtime'); $nowcatid = $fsql->f('catid'); $ifnew = $fsql->f('ifnew'); $ifred = $fsql->f('ifred'); $ifbold = $fsql->f('ifbold'); $author = $fsql->f('author'); $source = $fsql->f('source'); $cl = $fsql->f('cl'); $src[] = $fsql->f('src'); $memo = $fsql->f('memo'); if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "photo/html/" . $id . ".html")) { $link[] = ROOTPATH . "photo/html/" . $id . ".html"; } else { $link[] = ROOTPATH . "photo/html/?" . $id . ".html"; } if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } if ($cutbody != "0") { $memo = csubstr($memo, 0, $cutbody); } //if($src==""){$src="photo/pics/nopic.gif";} } //模版标签解释 $var = array('src1' => ROOTPATH . $src[0], 'src2' => ROOTPATH . $src[1], 'src3' => ROOTPATH . $src[2], 'src4' => ROOTPATH . $src[3], 'src5' => ROOTPATH . $src[4], 'src6' => ROOTPATH . $src[5], 'link1' => ROOTPATH . $link[0], 'link2' => ROOTPATH . $link[1], 'link3' => ROOTPATH . $link[2], 'link4' => ROOTPATH . $link[3], 'link5' => ROOTPATH . $link[4], 'link6' => ROOTPATH . $link[5]); $str .= ShowTplTemp($TempArr["list"], $var); $str .= $TempArr["end"]; return $str; }
} if ($ifchannel != 0) { err($strProductNotice9, "", ""); exit; } $msql->query("delete from {P}_product_cat where catid='{$catid}'"); } if ($step == "modi") { $cat = $_GET["cat"]; $catid = $_GET["catid"]; $pid = $_GET["pid"]; $xuhao = $_GET["xuhao"]; $tj = $_GET["tj"]; $cat = htmlspecialchars($cat); $msql->query("update {P}_product_cat set cat='{$cat}',xuhao='{$xuhao}' where catid='{$catid}' "); $msql->query("update {P}_product_cat set tj='{$tj}' where catpath regexp '" . fmpath($catid) . "' "); } ?> <div class="searchzone"> <table width="100%" border="0" cellspacing="0" cellpadding="2" height="30"> <tr> <td width="80" height="30"> <select name="pid" onChange="self.location=this.options[this.selectedIndex].value"> <option value='product_cat.php'><?php echo $strProductSelCat; ?> </option> <?php
function DownAuthorList() { global $fsql, $msql; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $showtj = $GLOBALS["PLUSVARS"]["showtj"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $catid = $GLOBALS["PLUSVARS"]["catid"]; $target = $GLOBALS["PLUSVARS"]["target"]; $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"]; } $id = htmlspecialchars($id); //查找条件 $fsql->query("select memberid from {P}_down_con where id='{$id}'"); if ($fsql->next_record()) { $authormemberid = $fsql->f('memberid'); } $scl = " iffb='1' and catid!='0' and memberid='{$authormemberid}' "; 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); $str = $TempArr["start"]; $picnum = 1; $fsql->query("select * from {P}_down_con where {$scl} order by uptime desc limit 0,{$shownums}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $catpath = $fsql->f('catpath'); $dtime = $fsql->f('dtime'); $nowcatid = $fsql->f('catid'); $ifnew = $fsql->f('ifnew'); $ifred = $fsql->f('ifred'); $ifbold = $fsql->f('ifbold'); $author = $fsql->f('author'); $source = $fsql->f('source'); $cl = $fsql->f('cl'); $src = $fsql->f('src'); $cl = $fsql->f('cl'); $fileurl = $fsql->f('fileurl'); $downcount = $fsql->f('downcount'); $prop1 = $fsql->f('prop1'); $prop2 = $fsql->f('prop2'); $prop3 = $fsql->f('prop3'); $prop4 = $fsql->f('prop4'); $prop5 = $fsql->f('prop5'); $prop6 = $fsql->f('prop6'); $prop7 = $fsql->f('prop7'); $prop8 = $fsql->f('prop8'); $prop9 = $fsql->f('prop9'); $prop10 = $fsql->f('prop10'); $prop11 = $fsql->f('prop11'); $prop12 = $fsql->f('prop12'); $prop13 = $fsql->f('prop13'); $prop14 = $fsql->f('prop14'); $prop15 = $fsql->f('prop15'); $prop16 = $fsql->f('prop16'); $prop17 = $fsql->f('prop17'); $prop18 = $fsql->f('prop18'); $prop19 = $fsql->f('prop19'); $prop20 = $fsql->f('prop20'); $memo = $fsql->f('memo'); if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "down/html/" . $id . ".html")) { $link = ROOTPATH . "down/html/" . $id . ".html"; } else { $link = ROOTPATH . "down/html/?" . $id . ".html"; } $dtime = date("Y-m-d", $dtime); if ($ifbold == "1") { $bold = " style='font-weight:bold' "; } else { $bold = ""; } if ($ifred != "0") { $red = " style='color:" . $ifred . "' "; } else { $red = ""; } if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } //模版标签解释 $var = array('title' => $title, 'memo' => $memo, 'dtime' => $dtime, 'red' => $red, 'bold' => $bold, 'link' => $link, 'target' => $target, 'author' => $author, 'source' => $source, 'cat' => $cat, 'catstr' => $catstr, 'src' => $src, 'cl' => $cl, 'picnum' => $picnum, 'fileurl' => $fileurl, 'downcount' => $downcount, 'prop1' => $prop1, 'prop2' => $prop2, 'prop3' => $prop3, 'prop4' => $prop4, 'prop5' => $prop5, 'prop6' => $prop6, 'prop7' => $prop7, 'prop8' => $prop8, 'prop9' => $prop9, 'prop10' => $prop10, 'prop11' => $prop11, 'prop12' => $prop12, 'prop13' => $prop13, 'prop14' => $prop14, 'prop15' => $prop15, 'prop16' => $prop16, 'prop17' => $prop17, 'prop18' => $prop18, 'prop19' => $prop19, 'prop20' => $prop20, 'propname1' => $propname1, 'propname2' => $propname2, 'propname3' => $propname3, 'propname4' => $propname4, 'propname5' => $propname5, 'propname6' => $propname6, 'propname7' => $propname7, 'propname8' => $propname8, 'propname9' => $propname9, 'propname10' => $propname10, 'propname11' => $propname11, 'propname12' => $propname12, 'propname13' => $propname13, 'propname14' => $propname14, 'propname15' => $propname15, 'propname16' => $propname16, 'propname17' => $propname17, 'propname18' => $propname18, 'propname19' => $propname19, 'propname20' => $propname20); $str .= ShowTplTemp($TempArr["list"], $var); $picnum++; } $str .= $TempArr["end"]; return $str; }
function ProductShiftdolphin() { global $fsql, $msql; $coltitle = $GLOBALS["PLUSVARS"]["coltitle"]; $shownums = $GLOBALS["PLUSVARS"]["shownums"]; $ord = $GLOBALS["PLUSVARS"]["ord"]; $sc = $GLOBALS["PLUSVARS"]["sc"]; $showtj = $GLOBALS["PLUSVARS"]["showtj"]; $cutword = $GLOBALS["PLUSVARS"]["cutword"]; $cutbody = $GLOBALS["PLUSVARS"]["cutbody"]; $target = $GLOBALS["PLUSVARS"]["target"]; $catid = $GLOBALS["PLUSVARS"]["catid"]; $tags = $GLOBALS["PLUSVARS"]["tags"]; $pagename = $GLOBALS["PLUSVARS"]["pagename"]; $tempname = $GLOBALS["PLUSVARS"]["tempname"]; $picw = $GLOBALS["PLUSVARS"]["picw"]; $pich = $GLOBALS["PLUSVARS"]["pich"]; $fittype = $GLOBALS["PLUSVARS"]["fittype"]; $scl = " iffb='1' and catid!='0' "; if ($showtj != "" && $showtj != "0") { $scl .= " and tj='1' "; } //显示分类规则:如果后台不指定分类,则显示当前所在分类,否则不限分类 if ($catid != 0 && $catid != "") { $catid = fmpath($catid); $scl .= " and catpath regexp '{$catid}' "; } $pos = strrpos($catid, '0'); $str = substr($catid, $pos + 1); $n = intval($str) * 20; $m = $n + 1; //模版解释 $Temp = LoadTemp($tempname); $TempArr = SplitTblTemp($Temp); $var = array('coltitle' => $coltitle, 'morelink' => $morelink, 'm' => $m); $str = ShowTplTemp($TempArr["start"], $var); $picnum = 1; $fsql->query("select * from {P}_product_con where {$scl} order by {$ord} {$sc} limit 0,{$shownums}"); while ($fsql->next_record()) { $id = $fsql->f('id'); $title = $fsql->f('title'); $catpath = $fsql->f('catpath'); $dtime = $fsql->f('dtime'); $nowcatid = $fsql->f('catid'); $ifnew = $fsql->f('ifnew'); $ifred = $fsql->f('ifred'); $ifbold = $fsql->f('ifbold'); $author = $fsql->f('author'); $source = $fsql->f('source'); $cl = $fsql->f('cl'); $src = $fsql->f('src'); $cl = $fsql->f('cl'); $memo = $fsql->f('memo'); $n++; if ($GLOBALS["CONF"]["CatchOpen"] == "1" && file_exists(ROOTPATH . "product/html/" . $id . ".html")) { $link = ROOTPATH . "product/html/" . $id . ".html"; } else { $link = ROOTPATH . "product/html/?" . $id . ".html"; } $dtime = date("Y-m-d", $dtime); if ($cutword != "0") { $title = csubstr($title, 0, $cutword); } if ($cutbody != "0") { $memo = csubstr($memo, 0, $cutbody); } if ($src == "") { $src = "product/pics/nopic.gif"; } $src = ROOTPATH . $src; //模版标签解释 $var = array('title' => $title, 'memo' => $memo, 'propstr' => $propstr, 'dtime' => $dtime, 'link' => $link, 'target' => $target, 'author' => $author, 'source' => $source, 'cat' => $cat, 'catid' => $catid, 'src' => $src, 'picw' => $picw, 'pich' => $pich, 'cl' => $cl, 'n' => $n); $str .= ShowTplTemp($TempArr["list"], $var); $picnum++; } $var = array('fittype' => $fittype); $str .= ShowTplTemp($TempArr["end"], $var); return $str; }