connect(); $id = isset($_GET['id']) ? $_GET['id'] : null; $cat_arr = array('event' => 'event' ); $postcat = isset($_GET['cat']) ? $_GET['cat'] : 'event'; if(!$catname = $cat_arr[$postcat]){ die("Category Error"); } $open_DB -> query('set names utf8'); $article = $open_DB -> findcontent($id); //print_r($article); $articleimage1 = $article['imagename1']; $articleimage2 = $article['imagename2']; $articleimage3 = $article['imagename3']; $articleimage4 = $article['imagename4']; $position = $article['position']; //echo $position.$articleimage1; $imgpath = $_SERVER['DOCUMENT_ROOT'].'/board/app/webroot/img/'; $imgurl = "/board/img/"; if($articleimage1){ $info1 = getimagesize($imgpath.$articleimage1); $width = $info1[0] > 550 ? 550 : $info1[0]; } ?>
550 ? 550 : $info1[0]; ?>