| Server IP : 180.180.241.3 / Your IP : 216.73.216.25 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 : C:/AppServ/www/umedia3/login.metadata/ |
Upload File : |
<?php
;
include ("../inc/config.inc.php");
head();
$_REQPERM="metadata-list";
mn_lib();
$tbname="index_db";
$is_canadd=library_gotpermission("metadata-cancreate");
$is_canupload=library_gotpermission("metadata-canupload");
if ( $setwebpageshowcaseall!="") {
tmq("update media set webpageshowcaseall='$setas' where randid='$setwebpageshowcaseall' ",false);
index_reindex($setwebpageshowcaseall);
}
if ($is_canadd == true && $commanddelete!="") {
$s=tmq("select * from dcdir");
while ($r2=mysql_fetch_array($s)) {
tmq ("delete from $r2[tbname] where mid='$commanddelete' ");
}
tmq("delete from media where randid='$commanddelete' ");
tmq("delete from webpage_showcase where mid='$commanddelete' ");
tmq("delete from webpage_showcaseall where mid='$commanddelete' ");
tmq("delete from webpage_bibrating_log where bibid='$commanddelete' ");
tmq("delete from webpage_bibrating_sum where bibid='$commanddelete' ");
tmq("delete from media_ftitems_anno where mid='$commanddelete' ");
index_remove($commanddelete);
index_ftremove($commanddelete);
}
?><BR><?
$kw=trim($kw);
$kw=stripslashes($kw);
$kw=addslashes($kw);
?><TABLE width=780 align=center>
<FORM METHOD=POST ACTION="index.php">
<TR>
<?if ($is_canadd==true) {?>
<TD><A HREF="addDBbook.php" class=a_btn><? echo getlang("เพิ่มรายการใหม่::l::Create new record");?></A></TD>
<?}?>
<TD><? echo getlang("ค้นหา::l::Search");?> : <INPUT TYPE="text" NAME="kw" value="<? echo $kw?>"> <? frm_metadatacate("selectthiscate",$selectthiscate,"yes");?> <INPUT TYPE="submit" value="OK"> <?
if ($kw!="" || $selectthiscate!="") {
echo "<A HREF='index.php'>".getlang("แสดงทั้งหมด::l::Display all")."</A>";
}
?> </TD>
</TR>
</FORM>
</TABLE><?
$c[2][text]="Randid::l::Randid";
$c[2][field]="randid";
$c[2][fieldtype]="text";
$c[2][descr]="";
$c[2][defval]="";
$c[3][text]="Importid::l::Importid";
$c[3][field]="importid";
$c[3][fieldtype]="text";
$c[3][descr]="";
$c[3][defval]="none";
$c[4][text]="Useradminid::l::Useradminid";
$c[4][field]="useradminid";
$c[4][fieldtype]="text";
$c[4][descr]="";
$c[4][defval]="";
//dsp
$userlist=tmq_dump("library","UserAdminID","UserAdminName");
$libsitelist=tmq_dump("library_site","code","name");
function local_mdtitle($wh) {
global $userlist;
global $libsitelist;
global $startrow;
//printr($wh);useradminid
//printr($userlist);
$s="";
$s=marc_gettitle($wh[mid]);
$s.="<BR><I>".getlang("โดย::l::By")."</I> ";;
$s.=" ".$userlist[$wh[useradminid]];
$s.=", ".$libsitelist[$wh[LIBSITE]]."";
$s.="<BR>";
if ($wh[webpageshowcaseall]=='yes') {
$s.= "<A HREF='index.php?setwebpageshowcaseall=$wh[mid]&setas=no&startrow=$startrow'><IMG SRC='setsc-all2.png' WIDTH=150 HEIGHT=43 BORDER=0></A>";
} else {
$s.= "<A HREF='index.php?setwebpageshowcaseall=$wh[mid]&setas=yes&startrow=$startrow'><IMG SRC='setsc-all1.png' WIDTH=150 HEIGHT=43 BORDER=0></A>";
}
return $s;
}
function local_attatch($wh) {
global $is_canupload;
global $startrow;
if ($is_canupload==true) {
$s="<A HREF='../login.upload/index.php?mid=$wh[mid]' style='color: darkgreen'>".getlang("อัพโหลด::l::Upload")."</A>";;
} else {
$s="-";
}
$cc=tmq("select id from media_ftitems where mid='$wh[mid]' ");
$s.=" <FONT class=smaller>(".number_format(tmq_num_rows($cc)).")</FONT>";
return $s;
}
function local_action($wh) {
//printr($wh);
global $is_canadd;
global $startrow;
if ($is_canadd==true) {
$s="<A HREF='index.php?commanddelete=$wh[mid]' onclick=\"return confirm('Please confirm');\" style='color: darkred'>".getlang("ลบ::l::Delete")."</A>";;
$s.="/<A HREF='addDBbook.php?load=$wh[mid]'>".getlang("แก้ไข::l::Edit")."</A>";;
} else {
$s="-";
}
return $s;
}
function local_icon($wh) {
return "<TABLE bgcolor=f2f2f2 width=100%>
<TR>
<TD>".show_mediaicon($wh[mid],"return","no","120","","no","_blank")."</TD>
</TR>
</TABLE>";
}
$dsp[12][text]="-";
$dsp[12][field]="randid";
$dsp[12][filter]="module:local_icon";
$dsp[12][width]="20%";
$dsp[2][text]="ชื่อเรื่อง::l::Title";
$dsp[2][field]="randid";
$dsp[2][filter]="module:local_mdtitle";
$dsp[2][width]="60%";
$dsp[3][text]="แนบไฟล์::l::Attatch Media";
$dsp[3][field]="randid";
$dsp[3][filter]="module:local_attatch";
$dsp[3][width]="20%";
$dsp[3][align]="center";
$dsp[4][text]="ลบ/แก้ไข::l::Delete/Edit";
$dsp[4][field]="randid";
$dsp[4][align]="center";
$dsp[4][filter]="module:local_action";
$dsp[4][width]="20%";
if ($kw=="") {
$limit=" 1 ";
} else {
$limit=" (titl like '%$kw%' or kw like '%$kw%') ";
}
if ($selectthiscate!="") {
$limit.=" and cate ='$selectthiscate' ";
}
//printr($_SESSION);
//echo $limit;
//fixform_tablelister($tbname," $limit ",$dsp,"no","no","no","mi=$mi",$c," lastactive desc ");
fixform_tablelister($tbname," $limit ",$dsp,"no","no","no","mi=$mi",$c," mid desc ");
foot();
?>