setQuery($query); $result = $dbObj->exQuery(); if ($result == 1 || $result <= 0) { $dbInfo[flag] = false; } # if $urlV=$ufObj->newURL($PHP_SELF,"xndb.html"); echo ""; exit; } if ($mode=="reset") { $dbInfo[flag] = false; $urlV=$ufObj->newURL($PHP_SELF,"xndb.html"); echo ""; exit; } ?> XNDB 2.0 ">
XNDB 2.0 written by Lee,Young-Hwa who is JAVA, C++, PHP Developer.
DB_RESETTING    
HOST NAME : USER NAME : PASSWORD : DATABASE NAME :  
'; } if ($dbInfo[flag] == true) { echo '
DATABASE NAME : '.$dbInfo[dbName].'
 
'.stripslashes($query).'
'; if (!$query) $query="show tables"; if (trim(stripslashes($query)) == 'exit') { echo ''; exit; } $dbObj = new MysqlClass($dbInfo[hostName],$dbInfo[userName],$dbInfo[userPW],$dbInfo[dbName]); $dbObj->setQuery(trim(stripslashes($query))); $result = $dbObj->exQuery(); if ($result==1 || $result<=0) { $urlV=$ufObj->newURL($PHP_SELF,"xndb.html"); echo ""; exit; } # if $nFields=mysql_num_fields($result); $nRows=mysql_num_rows($result); $buffer=0; echo ''; if ($result) { echo ''; for ($i=0; $i<$nFields; $i++) { echo ''; } # for echo''; } # if echo ''; for ($i=0; $i<$nFields; $i++) { echo ''; } # for echo ''; while($row=mysql_fetch_row($result)) { echo ''; for($i=0; $i<$nFields; $i++) { echo ''; } # for echo ''; } # while echo '
#'; echo mysql_field_name($result,$i); echo'
#'.$i.'
'.$buffer++.''.$row[$i].'
'; mysql_free_result($result); } # if ?> hostName=$hostName; $this->usrName=$usrName; $this->passWd=$passWd; $this->dbName=$dbName; } // Implementation of Useful Functions function setQuery($query) { if($query=="") return False; $this->query=$query; } function exQuery() { $linkIdentifier=@mysql_connect($this->hostName,$this->usrName,$this->passWd); $returnValue=@mysql_db_query($this->dbName,$this->query,$linkIdentifier); @mysql_close($linkIdentifier); return $returnValue; } } // End of MysqlClass ?> tag function nTobr($string) { return ereg_replace("\n","
",stripslashes($string)); } function nToRE($string) { return ereg_replace("\n","\n>",stripslashes($string)); } // Return Next Family ID function fmlID($result) { if ($result=="null") { return 1; }else { return $result+1; } } // Return new string after a array's last value is updated to a next character function parseString($string,$parent) { if($string=="") { return $parent.'A'; } $chars = preg_split('//',$string, -1, PREG_SPLIT_NO_EMPTY); $lastIndex=sizeof($chars)-1; $lastValue=$chars[$lastIndex]; $newChar=ord($lastValue)+1; // ASCII Value $chars[$lastIndex]=chr($newChar); return join("",$chars); } // indent function indent($str) { $indentValue=10; return strlen($str)*$indentValue; } // function answerIMG($str,$imgPath) { if(strlen($str)>1) { return $buffer=""; } } // ±è½Â¸¸´Ô FROM PHPSCHOOL function han_substr($string, $limit_length) { $string_length = strlen( $string ); if ( $limit_length <= $string_length ) { $string = substr( $string, 0, $limit_length ); $han_char = 0; for ( $i = $limit_length-1; $i>=0; $i-- ) { $lastword = ord( substr( $string, $i, 1 ) ); //µÚ¿¡¼­ ÇѱÛÀÚ¾¿ ¶¼¾î¼­ if ( 127 > $lastword ) { break; //Á¤»óÀûÀÎ ¿µ¹®ÀÚ,¼ýÀÚ¶ó¸é..stop }else { $han_char++; //ÇÑ±Û or Ư¼ö¹®ÀÚ¶ó¸é.. } // if } // for if ( $han_char%2 == 1 ) { //¦ÀÌ ¾È¸ÂÀ¸¹Ç·Î ÇѱÛÀÚ ´õ ÀÛ°Ô ÀÚ¸¥´Ù. $string = substr( $string, 0, $limit_length-1 ); }//if }//if return $string; }//end of han_substr function newURL($PHP_SELF_,$string) { $list=split('/',$PHP_SELF_); $list[sizeof($list)-1]=$string; for($i=1;$i<=sizeof($list)-1;$i++) { $result.='/'.$list[$i]; } return $result; } // end of newURL function filePath($string,$fullPath) { $dir="/".$string; $list=split('/',$fullPath); $result[fileName]=$list[sizeof($list)-1]; $result[filePath]=strstr($fullPath,$dir); return $result; } // End "filePath" } // End of UF Class ?>