Server IP : 180.180.241.3 / Your IP : 216.73.216.252 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /AppServ/www/umedia3/inc/ |
Upload File : |
<? function show_mediaicon_long($dspctrl="Multimedia",$wh,$mode="show",$displaytitle="yes",$height=120,$width=200,$ratescore="no",$linktarget="") { global $dcrURL; $dspctrl=strtolower($dspctrl); if ($linktarget=="") { if (barcodeval_get("webpage-o-clickmediausesamewindow")=="yes" ) { $linktarget="_top"; } else { $linktarget="_blank"; } } if ($fontcolor=="") { $fontcolor="#246BB3"; } if ($bgcolor=="") { $bgcolor="black"; } if ($headcolor=="") { $headcolor="#0051D7"; } global $kw; $kw1=urldecode($kw); $kw1=urldecode($kw1); $kw1=urldecode($kw1); $kw1=stripslashes($kw1); $kw1=trim($kw1,'"'); $kw=urlencode($kw); //echo "[$kw]"; //$ftlistdb.='<div style="position:relative; top:20; left:25; height: 0; width:0;margin: 0; padding:0;overflow:visible; background-color:red; " ><nobr>'; $mdinfo=tmq("select * from media where randid='$wh' "); $mdinfo=tmq_fetch_array($mdinfo); $ftlist=tmq("select * from index_db where mid='$wh' "); $ftlist=tmq_fetch_array($ftlist); $ftlist=explode(',',$ftlist[fttypelist]); $ftlistdb=""; $mddb=tmq_dump("dbfulltext_cate","code","name"); //printr($mddb); while (list($k,$v)=each($ftlist)) { if ($v!="") { $ftlistdb.="<img src='$dcrURL/_tmp/mediatype/$v.png' border=0 width=16 height=16 hspace=0 vspace=0 alt=\"".getlang($mddb[$v])."\" align=absmiddle><FONT style='font-size: 7;color:bbbbbb' >".getlang($mddb[$v])."</FONT>"; } } //$ftlistdb.='</nobr></div>'; $cover=tmq("select * from media_ftitems where iscover='yes' and mid='$wh' "); if (tmq_num_rows($cover)!=0) { $cover=tmq_fetch_array($cover); $coverurl=get_fturl($cover); if ($cover[uploadtype]=="upload") { $coverurl.=".thumb.jpg"; } } else { $coverurl="$dcrURL/neoimg/nocovergray.png"; } $strrating=""; //echo $ratescore; if ($ratescore=="yes") { $ratedb=tmq("select * from webpage_bibrating_sum where bibid='$wh' ",false); if (tmq_num_rows($ratedb)!=0) { $ratedb=tmq_fetch_array($ratedb); $scoredsp=number_format($ratedb[votescore],1); $scoretxt=floor(($ratedb[votescore]*20)/5); $scorecounttxt=number_format($ratedb[votecount]); $scoretxt=floor($scoretxt*5); $strrating='<font style="color:orange" class=smaller2>Rated: <B class=smaller2 style="color:orange">'.$scoredsp.'</B>/'.$scorecounttxt.' <img width=16 height=16 align=absmiddle src="$dcrURL/neoimg/bibrating/s'.$scoretxt.'.png" border=0></font>'; } } //echo "[$dspctrl]"; //////////////////////////////////////////////////////// if ($dspctrl=="multimedia") { $str.='<TABLE width="$width" height=1 border=0 cellspacing=0 cellpadding=1 style="float:left; border-width: 0px; margin: 2 5 2 2;" onmouseover="this.style.backgroundColor=\'#FFFFE1\';" onmouseout="this.style.backgroundColor=\'transparent\';" > <TR valign=top> <TD align=center valign=middle width=$width>'; //$str.=$ftlistdb; $str.='<table cellpadding=0 cellspacing=4 border=0 width=1 height=1 bgcolor=white style="border-color:$bgcolor;border-width:1;border-style:solid;"> <tr > <td align=center bgcolor=$fontcolor width=10%><a href="$dcrURL/index.php?mode=viewrecord&mid=$wh&kw=$kw" target="'.$linktarget.'"><img style="border-width: 1px; border-color:747474; border-style:solid;" border=0 height="$height" src="'.$coverurl.'" ></a></td> </tr> </table> </TD> </TR> <TR> <td align=center><div style="display:block; height: 50; width:$width; overflow:hidden; overflow-y: hidden;">'; if ($displaytitle=="yes") { $tmptitle=marc_gettitle($wh); $fulltitle=$tmptitle; if (strlen($tmptitle)>52) { $tmptitle=substr($tmptitle,0,50).".."; } $str.='<a href="$dcrURL/index.php?mode=viewrecord&mid=$wh&kw=$kw" class=smaller TITLE=\''.$fulltitle.'\' target="'.$linktarget.'" style="color:$headcolor; font-size: 14px;font-weight:normal;">'.$tmptitle.'</A><BR>'; if ($ratescore=="no") { $str.=''.$ftlistdb.''; } } //echo "[$tmp]"; $str.=$strrating.'</div> </td> </TR></TABLE>'; } ////////////////////////////////////////////////////////////////////////// if ($dspctrl=="e-book") { $tmptitle=marc_gettitle($wh); $tmpauth=marc_getauth($wh); $str='<TABLE width="700" height=55 border=0 cellspacing=0 cellpadding=0 style="background:url($dcrURL/neoimg/alpha50.png); margin: 5 0 5 5" onmouseover="this.style.backgroundColor=\'#FFFFE1\';" onmouseout="this.style.background=\'url($dcrURL/neoimg/alpha50.png)\';" > <TR> <TD valign=top style="border: 0px #777777 solid; border-left-width: 4; padding: 0 0 0 0;"><span style="display: block; width:750; border: 0px dotted #777777; border-bottom-width:1px ; border-left-width:2px; border-left-style: solid;; background:url($dcrURL/neoimg/alpha70.png); background-color: #e2e2e2"> <a style="font-size:14; color: #1C4E80; font-weight: bold;" href="$dcrURL/index.php?mode=viewrecord&mid=$wh&kw=$kw" target="'.$linktarget.'">'.getlang("ชื่อเรื่อง::l::Title").": ".$tmptitle.'</a></span> <span style="font-size:13"> '.getlang("ผู้แต่ง::l::Creator").": ".$tmpauth.'<BR><div style="clear:both;"></div>'; $s=tmq("select * from media_ftitems where mid='$wh' and (cachecate='pdf' or cachecate='pdf' ) order by text,ordr "); while ($r=tmq_fetch_array($s)) { $str.='<div style="display: inline-block;float:left; width: 150; height: 16; background-color: #EEEEEE; margin: 2 2 2 2; padding: 0 2 0 6; -moz-border-radius-topleft:2; -moz-border-radius-topright:2; -moz-border-radius-bottomright:2; -moz-border-radius-bottomleft:2; -webkit-border-top-left-radius:2; -webkit-border-top-right-radius:2; -webkit-border-bottom-left-radius:2; -webkit-border-bottom-right-radius:2; overflow:hidden;"><A HREF="$dcrURL/index.php?mode=viewrecord&mid=$wh&viewsinglefile='.$r[id].'&setdisplayname='.urlencode($r[text]).'" style="font-size: 12"> <img src="$dcrURL/_tmp/mediatype/pdf.png" width=14 height=14 align=absmiddle border=0> '.substr($r[text],0,17).'..</A></div>'; } $str.='<div style="display: inline-block; width: 110; height: 16; margin: 2 2 2 2; padding: 0 2 0 6; -moz-border-radius-topleft:2; -moz-border-radius-topright:2; -moz-border-radius-bottomright:2; -moz-border-radius-bottomleft:2; -webkit-border-top-left-radius:2; -webkit-border-top-right-radius:2; -webkit-border-bottom-left-radius:2; -webkit-border-bottom-right-radius:2; overflow:hidden;">'.$strrating.'</div></span></TD> </TR> </TABLE>'; } ////////////////////////////////////////////////////////////////////////// if ($dspctrl=="photo_gallery") { $tmptitle=marc_gettitle($wh); $tmpauth=marc_getauth($wh); $str='<TABLE width="745" height=80 border=1 cellspacing=0 cellpadding=0 style="background:url($dcrURL/neoimg/alpha50.png); margin: 5 5 0 5" onmouseover="this.style.backgroundColor=\'#FFFFE1\';" onmouseout="this.style.background=\'url($dcrURL/neoimg/alpha50.png)\';" > <TR> <TD valign=top style="display: block; border: 0px #777777 solid; border-left-width: 4; padding: 0 0 0 0;"> <div style="display:inline-block; width:80; height: 80; text-align:center;float:left; overflow:hidden; margin-right: 5"> <img src="$coverurl" height=60 style=";" border=0 hspace=4 vspace=4></div> <span style="display: inline-block; width:595; border: 0px dotted #777777; border-bottom-width:0px ; border-left-width:0px; border-left-style: solid;; background:url($dcrURL/neoimg/alpha70.png);"> <a style="font-size:14; color: #1C4E80; font-weight: bold;" href="$dcrURL/index.php?mode=viewrecord&mid=$wh&kw=$kw" target="'.$linktarget.'">'.getlang("ชื่อเรื่อง::l::Title").": ".$tmptitle.'</a></span> <div style="font-size:13"> '.getlang("ผู้แต่ง::l::Creator").": ".$tmpauth.' </div><div stsyle="clear:both;"></div>'; $s=tmq("select * from media_ftitems where mid='$wh' and iscover<>'yes' and (cachecate='images' or cachecate='images' ) order by text,ordr "); $i=0; $alli=tmq_num_rows($s); while ($r=tmq_fetch_array($s)) { $i++; if ($i>7) { break; } $ithumb=get_fturl($r); //printr($ithumb); if ($r[uploadtype]=="upload") { $ithumb.=".thumb.jpg"; } $str.='<div style="display: inline-block; float:right; "><A HREF="$dcrURL/index.php?mode=viewrecord&mid=$wh&viewsinglefile='.$r[id].'&setdisplayname='.urlencode($r[text]).'" style="font-size: 12"> <img src="'.$ithumb.'" height=40 align=absmiddle border=0 hspace=2 title="'.substr($r[text],0,17).'.."></A></div>'; } if ($i<$alli) { $str.= "<A HREF='$dcrURL/index.php?mode=viewrecord&mid=$wh' style='display:inline-block; float:right;font-size: 12;'>".getlang("ทั้งหมด::l::All")." $alli </A>"; } $str.='<div style="display: inline-block; width: 110; height: 16; margin: 2 2 2 2; padding: 0 2 0 6; -moz-border-radius-topleft:2; -moz-border-radius-topright:2; -moz-border-radius-bottomright:2; -moz-border-radius-bottomleft:2; -webkit-border-top-left-radius:2; -webkit-border-top-right-radius:2; -webkit-border-bottom-left-radius:2; -webkit-border-bottom-right-radius:2; overflow:hidden;">'.$strrating.'</div></span></TD> </TR> </TABLE><div style="clear:both;"></div>'; } ////////////////////////////////////////////////////////////////////////// $str=str_replace('$dcrURL',$dcrURL,$str); $str=str_replace('$wh',$wh,$str); $str=str_replace('$fontcolor',$fontcolor,$str); $str=str_replace('$coverurl',$coverurl,$str); $str=str_replace('$bgcolor',$bgcolor,$str); $str=str_replace('$headcolor',$headcolor,$str); $str=str_replace('$height',$height,$str); $str=str_replace('$width',$width,$str); $kw1=addslashes($kw1); $str=str_replace('$kw',$kw1,$str); if ($mode=="return") { return $str; } else { echo $str; } } ?>