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; }
function uploadshow($dateid, $scatid) { $dbfile = new DB_file(); $query = "select *from tb_category_list where fd_cat_dateid='{$dateid}' and fd_cat_scatid='{$scatid}'"; $dbfile->query($query); if ($dbfile->nf()) { $dbfile->next_record(); $id = $dbfile->f(fd_cat_id); $filename = $dbfile->f(fd_cat_name); $url = $dbfile->f(fd_cat_url); $thumurl = $dbfile->f(fd_cat_thumurl); $display = $dbfile->f(fd_cat_display); $action = "edit"; } $result = array("id" => $id, "filename" => $filename, "url" => $url, "thumurl" => $thumurl, "display" => $display, "action" => $action); return $result; }
function AutogetFileimg($scatid, $dateid) { $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("../file/", "", $thumrul); $vpic = "http://www.ms56.net/managementfile/file/" . $thumrul; } } else { $vpic = "http://www.ms56.net/managementfile/file/" . $thumrul; } // $dbfile->close(); $returnarray = $vpic . "@@" . $catid; return $returnarray; }
function readAuthorupicinfo($uploadpictype, $authorid) { global $picurl, $g_propic; $dbfile = new DB_file(); $Publiccls = new PublicClass(); //初始化类实例 $query = "select * from tb_upload_scategoty\n\t\t\tleft join tb_upload_fcategory on fd_scat_fcatid=fd_fcat_id \n\t\t\twhere fd_scat_id='{$uploadpictype}'"; $dbfile->query($query); if ($dbfile->nf()) { $dbfile->next_record(); $ffoldername = g2u($dbfile->f(fd_fcat_foldername)); $sfoldername = g2u($dbfile->f(fd_scat_foldername)); } $arr_uplaod = getupload($uploadpictype, $authorid); //echo var_dump($arr_uplaod); $arr_message['picid'] = $arr_uplaod[0]['pic']; $arr_message['picpath'] = $arr_uplaod[1]['picpath']; $thumrul = str_replace("../", "", $arr_message['picpath']); if (@eregi('http', $thumrul)) { $arr_message['picpath'] = $thumrul; } else { $arr_message['picpath'] = $g_propic . $thumrul; } $arr_message['uploadpictype'] = g2u($uploadpictype); $arr_message['uploadmethod'] = $arr_message['picid'] ? "modi" : "new"; $arr_message['uploadurl'] = $picurl . 'mobilepaypic/'; $pictype = '格式:jpg|bmp|gif'; $pictype = $pictype; $uplaodmessage = "<msgchild>"; $uplaodmessage .= "<picid>" . $arr_message['picid'] . "</picid>"; $uplaodmessage .= "<pictype>" . $pictype . "</pictype>"; $uplaodmessage .= "<picpath>" . $arr_message['picpath'] . "</picpath>"; $uplaodmessage .= "<uploadpictype>" . $arr_message['uploadpictype'] . "</uploadpictype>"; $uplaodmessage .= "<uploadurl>" . $arr_message['uploadurl'] . "</uploadurl>"; $uplaodmessage .= "<uploadmethod>" . $arr_message['uploadmethod'] . "</uploadmethod>"; $uplaodmessage .= "</msgchild>"; $arr_xml = $Publiccls->xml_to_array($uplaodmessage); return $arr_xml; }
function getupload($uploadpictype, $authorid) { $dbfile = new DB_file(); $query = "select * from tb_upload_category_list where fd_cat_dateid='{$authorid}' and fd_cat_scatid='{$uploadpictype}' order by fd_cat_id desc"; $dbfile->query($query); if ($dbfile->nf()) { while ($dbfile->next_record()) { $returnvalue[]["pic"] = $dbfile->f(fd_cat_id); $returnvalue[]["picpath"] = $dbfile->f(fd_cat_thumurl); } } else { $returnvalue[]["pic"] = "0"; $returnvalue[]["picpath"] = "null"; } return $returnvalue; }