function AutogetFileimg_id($scatid, $id) { //global ""; global $g_propic; $dbfile = new db_test(); $query = "select * from tb_upload_category_list where fd_cat_scatid='{$scatid}' and fd_cat_id = '{$id}'"; $dbfile->query($query); if ($dbfile->nf()) { $dbfile->next_record(); $catid = $dbfile->f(fd_cat_id); $filename = $dbfile->f(fd_cat_name); $picname = $dbfile->f(fd_cat_url); $thumrul = $dbfile->f(fd_cat_thumurl); $display = $dbfile->f(fd_cat_display); $thumrul = str_replace("../", "", $thumrul); $vpic = "" . $thumrul; $returnarray = $vpic . "@@" . $catid; } else { $thisclass = new oldimgfile(); //��ʼ����ʵ�� $returnarray = $thisclass->readoldfiles($scatid, $dateid); } if ($returnarray == "" and ($scatid == 5 or $scatid == 35)) { $returnarray = $g_propic . "images/null.jpg@@"; } return $returnarray; }
function getmoreFileimg($scatid, $dateid) { global $g_showpic; $dbfile = new DB_file(); $query = "select * from tb_category_list where fd_cat_scatid='{$scatid}' and fd_cat_dateid = '{$dateid}' order by fd_cat_display desc"; $dbfile->query($query); if ($dbfile->nf()) { while ($dbfile->next_record()) { $catid = $dbfile->f(fd_cat_id); $filename = $dbfile->f(fd_cat_name); $picname = $dbfile->f(fd_cat_url); $thumrul = $dbfile->f(fd_cat_thumurl); $display = $dbfile->f(fd_cat_display); $thumrul = str_replace("../", "", $thumrul); $picurl = $g_showpic . $thumrul; $arr_list[] = array("vid" => $catid, "filename" => $filename, "picname" => $picname, "picurl" => $picurl, "display" => $display); } } else { $thisclass = new oldimgfile(); //初始化类实例 $arr_list = $thisclass->readoldfiles($scatid, $dateid); if ($arr_list == "") { $arr_list[] = array("vid" => $catid, "filename" => $filename, "picname" => $picname, "picurl" => $picurl, "display" => $display); } } $returnarray = $arr_list; return $returnarray; }