KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /home/queenjbs/www/conf/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/queenjbs/www/conf/conf_function_DB.lib
<?
  //test admin 용임..  
  // 한개의 데이터만 가져올경우
  function Get_db($query) {  
    $res = mysql_query($query) or die(mysql_error());
    if( $res ) {
      $row = mysql_fetch_array($res);
      return $row[0];
    }
    else return 0;
  }
  
  // 쿼리 실행
  function Put_db($query) {  
    $res = mysql_query($query) or die(mysql_error());
    return $res;
  }

  // 한줄을 가져올경우
  function Get_dblink($query) { 
    $res = mysql_query($query) or die(mysql_error());
    if( $res ) {
      $row = mysql_fetch_array($res);
      return $row;
    }
    else {
      return "";
    }
  }
  
  // 여러줄을 가져올경우
  function Get_dbres($query) {  
    $res = mysql_query($query) or die(mysql_error());
    return $res;
  }  

  // 쿼리 입력값에 대한 타당성 검사를 수행
  function error($errcode) {
     switch ($errcode) {
                                      
        case ("QUERY_ERROR") :      
           $err_no = mysql_errno();
           $err_msg = mysql_error();         
           $error_msg = "ERROR CODE " . $err_no . " : $err_msg";                           
           $error_msg = addslashes($error_msg);         
           popup_msg($error_msg);  
           break;
  
        case ("DB_ERROR") :      
           $err_no = mysql_errno();
           $err_msg = mysql_error();         
           $error_msg = "ERROR CODE " . $err_no . " : $err_msg";                           
           echo("$error_msg");
           break;
  
        case ("IDX_ERROR") :      
           $error_msg = "로그인이 되어있지 않습니다.\n로그인 후 이용하세요";
           echo("$error_msg");
           break;
           
        default :
     }
  }

  // 팝업 메세지
  function popup_msg($msg) {
     echo("<script language=\"javascript\"> 
     <!--
     alert('$msg');
     history.back();
     //-->   
     </script>");
  }
?>

Anon7 - 2021