$organization_sql = get_organization($id, $organization_id); $organization = mysql_fetch_assoc($organization_sql); if ($_POST["organization_comment"] != $organization["ORGANIZATION_COMMENT"]) { $query = "UPDATE `organization` SET `ORGANIZATION_COMMENT`='" . $_POST['organization_comment'] . "' WHERE `ID`={$organization_id}"; mysql_query($query); } } if (isset($_POST["organization_name"]) && !empty($_POST["organization_name"]) && $organization_id != 0) { $organization_sql = get_organization($id, $organization_id); $organization = mysql_fetch_assoc($organization_sql); if ($_POST["organization_name"] != $organization["ORGANIZATION_NAME"]) { $query = "UPDATE `organization` SET `ORGANIZATION_NAME`='" . $_POST['organization_name'] . "' WHERE `ID`={$organization_id}"; mysql_query($query); } } $organization_sql = get_organization($id, $organization_id); $organization = mysql_fetch_assoc($organization_sql); if ($_POST["organization_role"] != $organization["ORGANIZATION_ROLE"] && !empty($_POST["organization_role"])) { echo $query = "UPDATE `organizationrole` SET `ORGANIZATIONROLE_THRU_DATE`='{$time}' WHERE `PERSON_ID`={$id} AND `ORGANIZATION_ID`={$organization_id} AND `ORGANIZATIONROLE_THRU_DATE`=''"; mysql_query($query); if (!empty($_POST["organization_role"])) { echo $query = "INSERT INTO `organizationrole`(`PERSON_ID`, `ORGANIZATION_ID`, `ORGANIZATION_ROLE`, `ORGANIZATIONROLE_FROM_DATE`) VALUES ({$id},{$organization_id},'" . $_POST["organization_role"] . "','{$time}')"; mysql_query($query); } } $homeTels = get_person_contact($organization_id, 6); while ($homeTel = mysql_fetch_assoc($homeTels)) { $contact_fomat = split('[-]', $_POST["organization_tel" . $homeTel['ID']]); $contact_area = $contact_fomat[0]; $contact_str = $contact_fomat[1]; $comment = $_POST['organization_tel_comment' . $homeTel['ID']];
} }); }); }); </script> </head> <body class="btn-danger"> <!--<div class="container">--> <div class=" col-sm-12"> <center> <?php include '../../helper/db_connect.php'; include '../../helper/helper.php'; connect_database(); $organizationAddrs = get_organization($id, $organization_id); $organizationAddr = mysql_fetch_assoc($organizationAddrs); // print_r($organizationAddr); ?> </center> <div class="row"> <form class="well" action="../action/edit_organization_contact.php" method="Post" style="margin:10 10 10 10" enctype="multipart/form-data"> <input type="text" name="id" hidden="hidden" value="<?php echo $id; ?> "> <input type="text" name="organization_id" hidden="hidden" value="<?php echo $organization_id; ?> ">
$organization_comment = $_POST["organization_comment"]; $organization_name = $_POST["organization_name"]; $organizations = get_organization_detail($organization_id); $organization = mysql_fetch_assoc($organizations); if ($organization['ORGANIZATION_NAME'] != $organization_name || $organization['ORGANIZATION_TYPE_ID'] != $organization_type || $organization['ORGANIZATION_COMMENT'] != $organization_comment) { // echo $query = "UPDATE `organizationrole` SET `ORGANIZATIONROLE_THRU_DATE`='$time' WHERE `PERSON_ID`=$id AND `ORGANIZATION_ID`=$organization_id AND `ORGANIZATIONROLE_THRU_DATE`=''"; // mysql_query($query); $sql = "INSERT INTO `organization`(`ORGANIZATION_NAME`, `ORGANIZATION_TYPE_ID`, `ORGANIZATION_COMMENT`) VALUES ('{$organization_name}','{$organization_type}','{$organization_comment}')"; mysql_query($sql); $sql = mysql_query("SELECT * FROM `organization` ORDER BY id DESC LIMIT 1"); while ($row = mysql_fetch_assoc($sql)) { $organization_id = $row['ID']; } } if ($organization_id == $_POST['organization_id']) { $organizationroles = get_organization($person_id, $organization_id); $organizationrole = mysql_fetch_assoc($organizationroles); if ($organizationrole['ORGANIZATION_ROLE'] != $organization_role) { echo $query = "UPDATE `organizationrole` SET `ORGANIZATIONROLE_THRU_DATE`='{$time}' WHERE `PERSON_ID`={$id} AND `ORGANIZATION_ID`={$organization_id} AND `ORGANIZATIONROLE_THRU_DATE`=''"; mysql_query($query); echo $query = "INSERT INTO `organizationrole`(`PERSON_ID`, `ORGANIZATION_ID`, `ORGANIZATION_ROLE`, `ORGANIZATIONROLE_FROM_DATE`) VALUES ({$id},{$organization_id},'" . $_POST["organization_role"] . "','{$time}')"; mysql_query($query); } } else { $org_id = $_POST['organization_id']; echo $query = "UPDATE `organizationrole` SET `ORGANIZATIONROLE_THRU_DATE`='{$time}' WHERE `PERSON_ID`={$id} AND `ORGANIZATION_ID`={$org_id} AND `ORGANIZATIONROLE_THRU_DATE`=''"; mysql_query($query); echo $query = "INSERT INTO `organizationrole`(`PERSON_ID`, `ORGANIZATION_ID`, `ORGANIZATION_ROLE`, `ORGANIZATIONROLE_FROM_DATE`) VALUES ({$id},{$organization_id},'" . $_POST["organization_role"] . "','{$time}')"; mysql_query($query); } echo "<script type='text/javascript'>";
if (!$is_testing) { insert_point($owner_id, $point_price, "적립포인트({$share_uniq}:회원<-광역본부) ", '@passive', $mb_id, $member[mb_id] . "-" . uniqid("")); } } $mb_temp = get_member($owner_id); $sms = new SMS("http://webservice.tongkni.co.kr/sms.3/ServiceSMS.asmx?WSDL"); //SMS 객체 생성 if ($point_price) { //2015-10-23// $result=$sms->SendSMS("moamoa1234","yein6510","070-7201-0106",$mb_temp[mb_hp],substr($mb3['mb_name'],0,2).$sec_name." 카드회원이 ".$mc_mer['mc_subject']."에서 적립한 포인트(".$point_name.") ".number_format($point_price)."P 가 적립되었습니다.");// 5개의 인자로 함수를 호출합니다. //$msg_temp .= "<br/>$point_name (".$mb_temp[mb_name].")님 <span style='color:red'>".$point_price."P</span></div>"; $etc_price = (int) $etc_price + (int) $price_61_value; } } //if($share_id[1] //단체 $org = get_organization($cd[cd_organization]); if ($org[mb_id]) { $owner_id = $org[mb_id]; } else { $owner_id = "moa"; } $price_65_id = $owner_id; $point_name = "단체"; $point_price = $price_65_value; $point_price7 = -1 * $point_price; $price_65_id = $owner_id; $point_id = "@@" . $owner_id; if (!$is_testing) { insert_point($point_id, $point_price, "적립포인트({$share_uniq}:단체) ", '@passive', $mb_id, $member[mb_id] . "-" . uniqid("")); } if (!$is_testing) {