function connect_db($code) { switch ($code) { case 'sjread' : // $db = @mysqli_connect('localhost', 'root', 'rootroot'); $db = @mysqli_connect('localhost', 'c25sj_read', 'ZG2#v8ks'); if (!$db) die ('The server is undergoing maintenances and the web site may be unavailable occasionally during the week. Sorry for any inconveniences caused. (error code: mysql error1)'); $db_selected = @mysqli_select_db($db, 'c25sj'); break; case 'sjwrite' : // $db = @mysqli_connect('localhost', 'root', 'rootroot'); $db = @mysqli_connect('localhost', 'c25sj_write', 'i4_e9PECa'); if (!$db) die ('The server is undergoing maintenances and the web site may be unavailable occasionally during the week. Sorry for any inconveniences caused. (error code: mysql error2)'); $db_selected = @mysqli_select_db($db, 'c25sj'); break; case 'menuread' : //$db = @mysqli_connect('localhost', 'root', 'rootroot'); $db = @mysqli_connect('localhost', 'c25menu_read', 'Q4TeCvrkcF@'); if (!$db) die ('The server is undergoing maintenances and the web site may be unavailable occasionally during the week. Sorry for any inconveniences caused. (error code: mysql error3)'); // $db_selected = @mysqli_select_db($db, 'dbseduhk_menu3'); $db_selected = @mysqli_select_db($db, 'c25menu'); break; } if (!$db_selected) die ('The server is undergoing maintenances and the web site may be unavailable occasionally during the week. Sorry for any inconveniences caused. (error code: mysql error4)'); @mysqli_query($db, "SET CHARACTER SET 'utf8'"); return $db; } function showNews($r, $i, $expand=0) { global $current, $color, $colors, $colorIndex, $image_bit, $attach_bit, $fbimage; if ($r['title'] == '') return ''; $r['title'] = html_entity_decode($r['title']); $r['content'] = html_entity_decode($r['content']); // echo '
 . '.png)
 . '.png)