| 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-cancreate";
mn_lib();
$now=time();
// คำสั่งบันทึกลงฐานข้อมูล
if ($todelete!="") {
$s=tmq("select * from dcdir");
while ($r2=mysql_fetch_array($s)) {
tmq ("delete from $r2[tbname] where mid='$todelete' ");
}
tmq("delete from media where randid='$todelete' ");
}
if ($todelete=="") {
$randid=randid();
}else {
$randid=$todelete;
}
$IDEDIT=$randid;
if ($todelete=="") {
tmq("insert into media_edittrace set
login='$useradminid',
dt='$now',
bibid='$IDEDIT',
edittype='add new record'
");
}else {
tmq("insert into media_edittrace set
login='$useradminid',
dt='$now',
bibid='$IDEDIT',
edittype='update record'
");
}
stat_add("up_update",$useradminid);
stat_add("upupdate_libsite",$LIBSITE);
$sql ="INSERT INTO `media` ( id , randid , importid,useradminid,LIBSITE,lastactive,cate,filenamedisplay,viewcount,webpageshowcaseall)
VALUES ('', '$randid','keyin','$useradminid','$setlibsite','$now','$selectthiscate','$filenamedisplay','$viewcount','$webpageshowcaseall');";
tmq($sql);
//print_r($data);
while (list($ikey , $i) = @each($data)) {
///foreach ($data as $ikey => $i) {
if (count($i)>1) {
$s=" insert into $i[did] set mid='$randid' ";
$allval="";
while (list($k , $val) = each($i)) {
$allval="$allval$val";
if ($k!='did') {
$val=stripslashes($val);
$val=stripslashes($val);
$val=stripslashes($val);
$val=addslashes($val);
$s=" $s ,$k='$val' ";
}
}
$s="$s , importid='keyin' ";
//echo "[$allval]";
//echo $s;
if ($allval!="") {
tmq($s);
}
//echo "$s<BR>";
}
}
sessionval_set("addbook-bringmeto",$bringmeto);
index_reindex($IDEDIT);
///die;
if ($bringmeto=="") {
redir("index.php?typeid=$typeid&faculty=$faculty&IDEDIT=$IDEDIT&startrow=$startrow&linkfrom=$IDEDIT");
}
if ($bringmeto=="addnewrecord") {
redir("addDBbook.php?startrow=$startrow");
}
if ($bringmeto=="uploadto") {
redir("../login.upload/index.php?mid=$IDEDIT&");
}
?>