What's New Archive// Database connection $con; function db_connect() { $con = mysql_pconnect("localhost","jfm@dmin","Dendo6632bu"); if ($con) { $db_con = mysql_select_db("jfmadmin",$con); return $con; } else { echo "Please try again later. Our system is not functioning as expected."; exit; } } function db_close() { if ($con) { mysql_close($con); return true; } } function make_date($date) { $year = substr($date,0,4); $month = substr($date,4,2); $day = substr($date,6,2); $jan = "January"; $feb = "February"; $mar = "March"; $apr = "April"; $may = "May"; $jun = "June"; $jul = "July"; $aug = "August"; $sep = "September"; $oct = "October"; $nov = "November"; $dec = "December"; switch ($month) { case "01" : $month = $jan; break; case "02" : $month = $feb; break; case "03" : $month = $mar; break; case "04" : $month = $apr; break; case "05" : $month = $may; break; case "06" : $month = $jun; break; case "07" : $month = $jul; break; case "08" : $month = $aug; break; case "09" : $month = $sep; break; case "10" : $month = $oct; break; case "11" : $month = $nov; break; case "12" : $month = $dec; break; } $date = $month ." ". $day .", ". $year; return $date; } ?> |