location.href='index.html'"; exit; } function getMicrotime() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } $script_action_start_time = getMicrotime(); function printActionTime() { global $script_action_start_time; $script_action_end_time = getMicrotime(); echo(""); } function MobileCheck() { $MobileArray = array("iphone", "lgtelecom", "skt", "mobile", "samsung", "nokia", "blackberry", "android", "sony", "phone", "linux x86_64"); foreach ($MobileArray as $device) { if (preg_match("/" . $device . "/", strtolower($_SERVER['HTTP_USER_AGENT']))) { return "Mobile"; } } return "Computer"; } if (MobileCheck() == "Mobile") { $skbanner_link = "https://m.skbroadband.com/Page.do?menu_id=P01000000"; } else { $skbanner_link = "https://www.skbroadband.com/product/smallmerchant/Page.do?retUrl=/product/smallmerchant/Dream"; } include "../config.php"; include $root_path . "/dbconn.php"; // mysqli 사용으로 dbconn.php 내용도 변경 필요 if ($boardcode == "") { $boardcode = "changup"; } $table_name = "table_" . $boardcode; // mysqli 사용 예제 // DB 연결 $dbconn = mysqli_connect($DB_SERVER, $DB_LOGIN, $DB_PASSWORD, $DB); if (!$dbconn) { die("데이터베이스 연결에 실패하였습니다: " . mysqli_connect_error()); } mysqli_set_charset($dbconn, "utf8"); // 문자셋 설정 $bdResult = mysqli_query($dbconn, "SELECT boardname FROM boardcode WHERE boardcode='$boardcode'") or die("쿼리 실패"); $bdRows = mysqli_fetch_row($bdResult); $boardTitle = $bdRows[0]; include "board.inc"; $boardset_res = mysql_query("select * from boardset where boardcode='$boardcode'", $dbconn); $boardset_row = mysql_fetch_array($boardset_res); $num_per_page = 20; $page_per_block = 5; $out_field = $boardset_row[outfield]; $highlighthit = $boardset_row[highlighthit]; $highlightday = $boardset_row[highlightday]; $bottomlist = $boardset_row[bottomlist]; $adminemail = $boardset_row[adminemail]; $mailreceiver = $boardset_row[mailreceiver]; $highlightday = time() - ($highlightday * 86400); ?>
if($mode=="view") { $viewtitle_res = mysql_query("select subject from table_changup where uid = '$uid'"); $viewtitle_res1 = mysql_query("select homepage from table_changup where uid = '$uid'"); $viewtitle = mysql_fetch_array($viewtitle_res); $viewcate = mysql_fetch_array($viewtitle_res1); if ($viewcate[homepage] == "기타"){ $viewcate[homepage] = "창업뉴스" ; } if(eregi("/",$viewcate[homepage]) || $viewcate[homepage]=="" || eregi("www",$viewcate[homepage]) || eregi("s",$viewcate[homepage]) || eregi("kr",$viewcate[homepage]) || eregi("com",$viewcate[homepage]) || eregi("net",$viewcate[homepage])) { $viewcate[homepage] = "신규창업정보" ; } ?>