⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userfunc.php3

📁 网络同学录程序
💻 PHP3
字号:
<?
/*大家好,我是豆腐
提供原码是我的一贯原则,但是希望大家能够尊重豆腐的工作
希望大家在使用的过程中随时和我联系 roboo@21cn.com
您可以随意修改代码,但是请保留我的注释(如果不保留,我也没办法)
如果您觉得这个程序对您有或多或少的帮助,豆腐希望能够得到您的鼓励
您的鼓励和支持,是我们工作的最大动力
    .  =======
   / \| O   O |
   \ /  \v_'/
    #   _| |_
   (#) (     )
    #\//|* *|\\
    #\/(  *  )/       //豆腐制作,都是精品
    #   =====
    #   (\ /)
    #   || ||
   .#---'| |----.
    #----' -----'
    //哲人说:用我的心换你的心,我们便拥有两颗心
*/
?>
<?
function check($year,$month,$day)
{
   if(is_numeric($year) and is_numeric($month) and is_numeric($day)){
      if(checkdate($month,$day,$year)){
         return true;
      }
      else{
         return false;
      }
   }
   else{
      return false;
   }
}

function str2date($date){
  $parts = explode(' ', $date);
  $date = $parts[0];
  $time = $parts[1];
  $ymd = explode('-', $date);
  $hms = explode(':', $time);
  $year = $ymd[0];
  $month = $ymd[1];
  $day = $ymd[2];
  $hour = $hms[0];
  $minute = $hms[1];
  $second = $hms[2];
  return mktime($hour, $minute, $second, $month, $day, $year);
}

function ReplaceSql($strSQL){
   return ereg_replace("'","''",$strSQL);
}

function getmaxid($conn,$type){
   global $DataBaseOwerName;
   $SQL="select max(SchoolID) maxid from class_" . $type;
   $stmt=opensql($conn,$SQL);
   $stmt=FecthRow($stmt);
   $maxID=getcolumn($stmt,"MAXID");
   if($maxID>0)
      $maxID=$maxID;
   else
      $maxID=1;
   return $maxID;
}

function EchoErr($strErrMsg){
  ?>
  <meta http-equiv="refresh" content="0;url=error.php3?msg=<? echo $strErrMsg ?>">
  <?
  exit;
}

?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -