<!-- 라디오버튼 전체선택/해제 처리-->
$(function(){
$("#check_all").click(function(){
$("input[id^='check_list']").attr("checked", $("#check_all").is(":checked"));
});
});
<!--체크박스 선택된 항목 삭제-->
function del(){
var state = 0;
var index = 0;
while($("input[id^='check_list']").is(":checked"))
{
state = 1;
}
if(state)
{
document.regist.submit();
}
else
{
alert("삭제할 상품을 선택하세요.");
return;
}
}
//-->
<?
$query="delete from ".$tablename." where idx = '".$value."' limit 1";
?>
자바스크립트
function act()
{
if(typeof(f.del_list) == 'object') {
}
자바스크립트
j = "문자열"+"문자열"
<script language="javascript">
<!--
//alert("삭제되었습니다.");
location.replace("list.php?code=notice");
//-->
</script>
<td><input name="check_list[]" type="checkbox" id="check_list" value="<?=$bbs_row->idx?>"/></td>
<?
echo "2006년 2월 29일 유효한 날짜입니다." . "<br>";
?>
<?
function db_connect(){
global $db;
$db =mysql_connect( "localhost", "adjb", "adjb1004");
if(!$db){
echo "Not connected.\n";
exit;
}
mysql_select_db("adjb",$db);
//mysql_query('set names euckr');
mysql_query("set names utf8");
}
db_connect();
if($_POST["new_apply"] && $_POST["change_apply"] == NULL)
{
$query = "insert into event_send(name, cell_number, address, work_place, attraction, recommender) values
('".$_POST["name"]."', '".$_POST["cell_number"]."', '".$_POST["address"]."', '".$_POST["work_place"]."', '".$_POST["attraction"]."', '".$_POST["recommender"]."')";
$result = mysql_query($query) or die (mysql_error());
//$row = mysql_fetch_row($result);
echo("데이터베이스 입력 완료");
}
else
{
$query = "update event_send set address = '".$_POST["address"]."', work_place = '".$_POST["work_place"]."', attraction = '".$_POST["attraction"]."', recommender = '".$_POST["recommender"].
"' where name = '".$_POST["name"]."'and cell_number = '".$_POST["cell_number"]."'";
$result = mysql_query($query) or die (mysql_error());
echo("데이터베이스 수정 완료~!");
}
?>
<?
$today_sql="and TO_DAYS(reg_date)=TO_DAYS(NOW())";
$table = "cs_bbs_data";
$notice_result = $db->select( $table, "where code='1_1board' $today_sql order by idx desc" );
$totalList1 = $db->cnt( $table, "where code='1_1board' $today_sql" );
$totalList = $db->cnt( $table, " where code='1_1board'" );
?>