', 0);
include_once(G5_PATH.'/head.php');
//°ü¸®ÀÚÀÎÁö üũ
if ($is_admin) {
//echo "°ü¸®ÀÚ
";
} else {
//echo "ÀϹÝ
";
alert("À߸øµÈ Á¢±ÙÀÔ´Ï´Ù.", G5_URL); //°ü¸®ÀÚ Àü¿ëÆäÀÌÁöÀ̹ǷΠÁ¢±ÙºÒ°¡
}
//³Ñ°Ü¹Þ´Â µ¥ÀÌÅÍ
//insert°æ¿ì-ÇÁ·Î±×·¥num(p_num)
//update°æ¿ì-¿¹¾ànum(bk_num) ³Ñ°Ü¹ÞÀ½
$bk_num=$_GET['bk_num'];
//µî·Ï,¼öÁ¤ ±¸ºÐ
if($bk_num=="") {
$mode="insert";
$p_num=$_GET['p_num']; //µî·ÏÇÒ‹ž getÀ¸·Î bk_num ´ë½Å p_num¸¸ ¹ÞÀ¸¹Ç·Î »ç¿ë
} else{
$mode="edit";
//±âÁ¸¿¹¾àÁ¤º¸ °¡Á®¿À±â
$sql="SELECT * FROM pgm_booking WHERE num=".$bk_num.";";
$row=sql_fetch($sql);
$p_num =$row[p_num]; //¼öÁ¤½Ã¿¡´Â getÀ¸·Î p_num ´ë½Å bk_num¸¸ ¹ÞÀ¸¹Ç·Î Çش翹¾àÀÇ p_numÀ» »ç¿ë
}
//echo $p_num."@@
";
//ÇÁ·Î±×·¥ Á¤º¸ °¡Á®¿À±â
$category="";
$sql="SELECT * FROM pgm_program WHERE num=".$p_num.";";
$p_row=sql_fetch($sql);
$category = $p_row['p_category'];
//Ä«Å×°í¸®¸í °¡Á®¿À±â
$sql="select p_cate_name from pgm_category where p_category=".$category.";";
$res=sql_fetch($sql);
$categoryName=$res[p_cate_name]; //Ä«Å×°í¸®¸í
//getµ¥ÀÌÅÍ·Î p_numÀ» ¾È ³Ñ±â°Å³ª, ³Ñ¾î¿Âp_numÀÌ ½ÇÁ¦·Î ÇÁ·Î±×·¥À¸·Î ÀúÀåµÇ¾îÀÖÁö¾ÊÀ¸¸é Ä«Å×°í¸®°ªÀÌ ¾øÀ¸¹Ç·Î ¿¹¾àÀúÀå ¸·¾Æ¾ßÇÔ
if($p_num=="" || $category==""){
alert("À߸øµÈ Á¢±ÙÀÔ´Ï´Ù.", G5_URL); //¿¹¾àÇÒ ÇÁ·Î±×·¥num°ª,Ä«Å×°í¸®°ªÀÌ ¾øÀ¸¹Ç·Î ¿¹¾àÀúÀåºÒ°¡
}
?>