<% sub leftStr(moTy,str) if moTy="mo" then response.Write str else if len(trim(str))>moTy then response.Write left(trim(str),moTy)&".." else response.Write trim(str) end if end if end sub %> <% sub TyOnly(Typ,tID,moren) if Typ="only_title" then AboutT=conn.execute("select top 1 [title] from channel where id="&tID&"")(0) call leftStr(moren,AboutT) elseif Typ="only_content" then AboutC=conn.execute("select top 1 [content] from channel where id="&tID&"")(0) call leftStr(moren,AboutC) elseif Typ="only_precis" then AboutC=conn.execute("select top 1 [precis] from channel where id="&tID&"")(0) call leftStr(moren,AboutC) elseif Typ="case_class" then ptName=conn.execute("select top 1 piccat_name from cpiccat where piccat_id="&tID&"")(0) call leftStr(moren,ptName) elseif Typ="case_name" then ptName=conn.execute("select top 1 pic_name from cpic where pic_id="&tID&"")(0) call leftStr(moren,ptName) elseif Typ="case_date" then ptName=conn.execute("select top 1 pic_date from cpic where pic_id="&tID&"")(0) call leftStr(moren,ptName) elseif Typ="case_content" then ptName=conn.execute("select top 1 pic_desc from cpic where pic_id="&tID&"")(0) call leftStr(moren,ptName) elseif Typ="case_spic" then ptName=conn.execute("select top 1 pic_spic from cpic where pic_id="&tID&"")(0) call leftStr(moren,ptName) elseif Typ="dj_class" then djName=conn.execute("select top 1 djcat_name from djcat where djcat_id="&tID&"")(0) call leftStr(moren,djName) elseif Typ="link_name" then lkname=conn.execute("select top 1 fl_name from friendlinks where fl_id="&tID&"")(0) call leftStr(moren,lkname) elseif Typ="link_pic" then lkpic=conn.execute("select top 1 fl_url from friendlinks where fl_id="&tID&"")(0) call leftStr(moren,mid(lkpic,4)) elseif Typ="link_url" then lkurl=conn.execute("select top 1 fl_logo from friendlinks where fl_id="&tID&"")(0) call leftStr(moren,lkurl) elseif Typ="news_class" then nClass=conn.execute("select top 1 cat_name from newcat where cat_id="&tID&"")(0) call leftStr(moren,nClass) elseif Typ="news_Content" then nContent=conn.execute("select top 1 news_content from news where news_id="&tID&"")(0) call leftStr(moren,nContent) elseif Typ="news_title" then nTitle=conn.execute("select top 1 news_title from news where news_id="&tID&"")(0) call leftStr(moren,nTitle) elseif Typ="news_date" then nDate=conn.execute("select top 1 news_date from news where news_id="&tID&"")(0) call leftStr(moren,nDate) elseif Typ="pic_class" then pcName=conn.execute("select top 1 piccat_name from piccat where piccat_id="&tID&"")(0) call leftStr(moren,pcName) elseif Typ="pic_name" then pcName=conn.execute("select top 1 pic_name from pic where pic_id="&tID&"")(0) call leftStr(moren,pcName) elseif Typ="pic_date" then pcName=conn.execute("select top 1 pic_date from pic where pic_id="&tID&"")(0) pcName=year(pcName)&"-"&right("0"&month(pcName),2)&"-"&right("0"&day(pcName),2) call leftStr(moren,pcName) elseif Typ="pic_content" then pcName=conn.execute("select top 1 pic_desc from pic where pic_id="&tID&"")(0) call leftStr(moren,pcName) elseif Typ="pic_spic" then pcName=conn.execute("select top 1 pic_spic from pic where pic_id="&tID&"")(0) call leftStr(moren,pcName) elseif Typ="dj_class_name" then pcName=conn.execute("select top 1 djcat_name from djcat where djcat_id="&tID&"")(0) call leftStr(moren,pcName) elseif Typ="dj_name" then pcName=conn.execute("select top 1 dj_name from dj where dj_id="&tID&"")(0) call leftStr(moren,pcName) elseif Typ="dj_pic" then pcName=conn.execute("select top 1 dj_pic from dj where dj_id="&tID&"")(0) call leftStr(moren,pcName) elseif Typ="dj_date" then pcName=conn.execute("select top 1 dj_date from dj where dj_id="&tID&"")(0) call leftStr(moren,pcName) elseif Typ="dj_content" then pcName=conn.execute("select top 1 dj_word from dj where dj_id="&tID&"")(0) call leftStr(moren,pcName) elseif Typ="art_class" then pcName=conn.execute("select top 1 cat_name from a_cat where cat_id="&tID&"")(0) call leftStr(moren,pcName) end if end sub %>