DonatShell
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/ULIB/_misc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /AppServ/www/ULIB/_misc/auth.php.bak
<?
include("../inc/config.inc.php");
html_start();
$tagnamedb=tmq_dump("bkedit_authority","fid","name");

$laststr=trim($laststr);
$laststr=trim($laststr,'.');
$laststr=trim($laststr);
if (strlen($laststr)<=5) {
	html_dialog("",getlang("กรุณากรอกข้อมูลยาวกว่านี้::l::Please enter longer information"));
	die;
}

if ($addnow=="yes" && $addtotag!="") {
	$s=tmq("select * from authoritydb_rule where workonmarctag like '%$tagid%'");
	if (tmq_num_rows($s)!=0) {
		$s=tmq_fetch_array($s);
		tmq("insert into authoritydb set $addtotag='$laststr' ,tag999='  ^a".get_library_name($useradminid)."' ");
	}
}
//printr($_GET);
?>
<script>
function addthis(wh) {
	//alert(parent);
	//alert(wh);
 <?
 $chk=tmq("select * from bkedit where fid='$tagid' ");
 $chk=tmq_fetch_array($chk);
$defindi1=substr($chk[defindi1],0,1);
$defindi2=substr($chk[defindi2],0,1);
if ($defindi1=='' || $defindi1=='b') {
	$defindi1='_';
}
if ($defindi2=='' || $defindi2=='b') {
	$defindi2='_';
}
 if ($chk[isrepeat]!="R") {
 		?>
		  parent.getobj('result_<? echo $tagid?>').innerHTML='';
		 	newid=parent.duplicatemarc("<? echo $tagid ?>","<?echo $defindi1;?>","<?echo $defindi2;?>",wh,"no");
			//alert(newid);
			//alert(wh);
			parent.setlastfocus("data"+newid);
			parent.showhidesuggestme_justhide();
			<?
 } else {
 ?> 
     parent.duplicatemarc("<? echo $tagid ?>","<?echo $defindi1;?>","<?echo $defindi2;?>",""+wh+"","yes");
	 <?
 }
 ?>

}
</script>
<?


function copier($wh) {
	global $parentjsid;
	$wh[word1]=(substr($wh[word1],2));
	if ($parentjsid=="") {
		$s= "<INPUT TYPE=text NAME='' value='$wh[word1]' style='cursor:hand; width: 100%' 
		noonclick=\"copyText(this)\" onclick=\"this.select()\">";
	} else {
		$dsp=dspmarc($wh[word1]);
		$dsp=str_remspecialsign($dsp);      			
		$s="<a href='javascript:void(0)' onclick=\"addthis('".addslashes($wh[word1])."');\" class=smaller>$dsp</a>";
	}
	return $s;
}


$s=tmq("select * from authoritydb_rule where workonmarctag like '%$tagid%'");
$sql=" 0 ";
while ($r=tmq_fetch_array($s)) {
	$sql.=" or $r[fid] like '$laststr' ";
}
$chk=tmq("select * from authoritydb where $sql",true);
if (tmq_num_rows($chk)==0) {
	echo getlang("ไม่พบ [$laststr] ในฐานข้อมูล Authority Control ต้องการเพิ่มทันทีหรือไม่?::l:: [$laststr] not found in Authority Control database, add now?")." ";
	echo getlang("เพิ่มใน::l::Add to").":";
	$s=tmq("select distinct fid from authoritydb_rule where workonmarctag like '%$tagid%' order by checkmode ");

	while ($r=tmq_fetch_array($s)) {
		$tagname=tmq("select * from bkedit_authority where fid='$r[fid]' ");
		if (tmq_num_rows($tagname)!=0) {
			$tagname=tmq_fetch_array($tagname);
			echo "<A class='a_btn smaller' HREF='auth.php?mid=$mid&tagid=$tagid&parentjsid=$parentjsid&laststr=$laststr&addnow=yes&addtotag=$r[fid]'>".$tagname[name]."($r[fid])</A>";
		}
	}
	die;
} else {
	echo "<B>".getlang("รายการที่มีในฐานข้อมูล Authority Control แล้ว::l::Record(s) exists in Authority Control Database")."</B><BR>";
	while ($chkr=tmq_fetch_array($chk)) {
		$tmp=explode(',',"tag100,tag110,tag111,tag130,tag148,tag150,tag151,tag155,tag180,tag181,tag182,tag185");
		while (list($k,$v)=each($tmp)) {
			if ($chkr[$v]!="") {
				echo "<FONT class=smaller>".$tagnamedb[$v].":<A class='a_btn smaller' HREF='javascript:void(null);' onclick=\"addthis('".$chkr[$v]."')\">".dspmarc($chkr[$v])."</A></FONT> ";
			}
		}
	}
	echo "<BR>";
}
/////////////////////

$s=tmq("select * from authoritydb_rule where workonmarctag like '%$tagid%' order by checkmode ");

while ($r=tmq_fetch_array($s)) {
	$resultdsp="";
	$resultdsp.= "<B>".ucwords(strtolower($r[checkmode])) . "</B> ";
	$s2=tmq("select * from authoritydb where $r[fid] like '%$laststr%' ");
	$dspcount=0;
	$resultdsp.=$tagnamedb[$r[pullfromtag]];
	while ($r2=tmq_fetch_array($s2)) {
		$datalist=explodenewline($r2[$r[pullfromtag]]);
		while (list($k1,$v1)=each($datalist)) {
			$str=marc_getsubfields($v1,"no");
			$str[w]="";
			$str2="";
			while (list($k,$v)=each($str)) {
				if ($v!="") {
					$str2.=" ".$v;//"=".$r2[$r[pullfromtag]];
				}
			}
			if (trim($str2)!="") {
				$dspcount++;
				$addstr="";
				@reset($str);
				while (list($kadd,$vadd)=each($str)) {
					if ($vadd!="") {
						$addstr.="^$kadd$vadd";
					}
				}
				$resultdsp.= " <nobr>&bull; <A HREF='javascript:void(null);' onclick=\"addthis('$addstr')\">".$str2."</A></nobr> ";
			}
		}
	}
	if ($dspcount>0) {
		echo $resultdsp;
		echo "<BR>";
	}
}


?>

Anon7 - 2022
AnonSec Team