本文整理汇总了PHP中fmpath函数的典型用法代码示例。如果您正苦于以下问题:PHP fmpath函数的具体用法?PHP fmpath怎么用?PHP fmpath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fmpath函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: create_poll
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}'");
}
开发者ID:noikiy,项目名称:cxe,代码行数:26,代码来源:photovote.inc.php
示例2: PhotoFabu
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;
}
开发者ID:noikiy,项目名称:cxe,代码行数:57,代码来源:PhotoFabu.php
示例3: NewsTreeClass
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;
}
开发者ID:noikiy,项目名称:cxe,代码行数:48,代码来源:NewsTreeClass.php
示例4: DownFabu
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;
}
开发者ID:noikiy,项目名称:cxe,代码行数:73,代码来源:DownFabu.php
示例5: NewsPicLb
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;
}
开发者ID:noikiy,项目名称:cxe,代码行数:69,代码来源:NewsPicLb.php
示例6: PhotoTwoClass
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;
}
开发者ID:noikiy,项目名称:cxe,代码行数:71,代码来源:PhotoTwoClass.php
示例7: PhotoHot
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);
//.........这里部分代码省略.........
开发者ID:noikiy,项目名称:cxe,代码行数:101,代码来源:PhotoHot.php
示例8: ProductList
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);
//.........这里部分代码省略.........
开发者ID:noikiy,项目名称:cxe,代码行数:101,代码来源:ProductList.php
示例9: while
<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">
开发者ID:noikiy,项目名称:cxe,代码行数:31,代码来源:product_conadd.php
示例10: DownQuery
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');
//.........这里部分代码省略.........
开发者ID:noikiy,项目名称:cxe,代码行数:101,代码来源:DownQuery.php
示例11: PhotoGl
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);
//.........这里部分代码省略.........
开发者ID:noikiy,项目名称:cxe,代码行数:101,代码来源:PhotoGl.php
示例12: NewsPicRollx3
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;
}
开发者ID:noikiy,项目名称:cxe,代码行数:79,代码来源:NewsPicRollx3.php
示例13: fmpath
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}'");
开发者ID:noikiy,项目名称:cxe,代码行数:31,代码来源:news_proj.php
示例14: PhotoModify
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
|
请发表评论