$headnum = -2000000000;
     }
     $next_data = mysql_fetch_array(mysql_query("select division,headnum from {$t_board}" . "_{$id} where division='{$max_division}' or division='{$second_division}' order by headnum limit 1"));
     if (!$next_data[0]) {
         $next_data[0] = "0";
     } else {
         $next_data = mysql_fetch_array(mysql_query("select no,headnum,division from {$t_board}" . "_{$id} where division='{$next_data['division']}' and headnum='{$next_data['headnum']}' and arrangenum='0'"));
     }
     $prev_no = 0;
 }
 $next_no = $next_data[no];
 $child = "0";
 $depth = "0";
 $arrangenum = "0";
 $father = "0";
 $division = add_division();
 mysql_query("insert into {$t_board}" . "_{$id} (division,headnum,arrangenum,depth,prev_no,next_no,father,child,ismember,memo,ip,password,name,homepage,email,subject,use_html,reply_mail,category,is_secret,sitelink1,sitelink2,file_name1,file_name2,s_file_name1,s_file_name2,x,y,reg_date,islevel) values ('{$division}','{$headnum}','{$arrangenum}','{$depth}','{$prev_no}','{$next_no}','{$father}','{$child}','{$member['no']}','{$memo}','{$ip}','{$password}','{$name}','{$homepage}','{$email}','{$subject}','{$use_html}','{$reply_mail}','{$category}','{$is_secret}','{$sitelink1}','{$sitelink2}','{$file_name1}','{$file_name2}','{$s_file_name1}','{$s_file_name2}','{$x}','{$y}','{$reg_date}','{$member['is_admin']}')") or error(mysql_error());
 $no = mysql_insert_id();
 // 현재글의 조회수를 올릴수 없게 세션 등록
 $hitStr = "," . $setup[no] . "_" . $no;
 $zb_hit = $HTTP_SESSION_VARS["zb_hit"] . $hitStr;
 session_register("zb_hit");
 // 현재글의 추천을 할수 없게 세션 등록
 $voteStr = "," . $setup[no] . "_" . $no;
 $zb_vote = $HTTP_SESSION_VARS["zb_vote"] . $voteStr;
 session_register("zb_vote");
 if ($prev_no) {
     mysql_query("update {$t_board}" . "_{$id} set next_no='{$no}' where no='{$prev_no}'");
 }
 if ($next_no) {
     mysql_query("update {$t_board}" . "_{$id} set prev_no='{$no}' where headnum='{$next_data['headnum']}' and division='{$next_data['division']}'");
Exemplo n.º 2
0
 if ($data[s_file_name2]) {
     $temp_ext = time();
     @mkdir("./data/{$board_name}/" . $temp_ext, 0777);
     @copy($data[file_name2], "./data/{$board_name}/" . $temp_ext . "/" . $data[s_file_name2]);
     $data[file_name2] = "data/{$board_name}/" . $temp_ext . "/" . $data[s_file_name2];
     @chmod("./" . $data[file_name2], 0706);
     @chmod("./data/{$board_name}/" . $temp_ext, 0707);
 }
 $data[name] = addslashes($data[name]);
 $data[subject] = addslashes($data[subject]);
 $data[memo] = addslashes($data[memo]);
 $sitelink1 = addslashes($sitelink1);
 $sitelink2 = addslashes($sitelink2);
 $email = addslashes($email);
 $homepage = addslashes($homepage);
 $division = add_division($board_name);
 $data[headnum] = $headnum;
 $data[division] = $division;
 $data[next_no] = $next_no;
 $data[prev_no] = 0;
 $data[category] = $category;
 $data[father] = $data[father] + $term_father;
 $data[child] = $data[child] + $term_child;
 // 게시물 삭제시 기록 남길 경우
 if ($notice_bbs) {
     $data[memo] .= "\n* {$member['name']}님에 의해서 게시물 " . $_kind . "되었습니다 (" . date("Y-m-d H:i") . ")";
 }
 mysql_query("insert into {$t_board}" . "_{$board_name} (division,headnum,arrangenum,depth,prev_no,next_no,father,child,ismember,memo,ip,password,name,homepage,email,subject,use_html,reply_mail,category,is_secret,sitelink1,sitelink2,file_name1,file_name2,s_file_name1,s_file_name2,x,y,reg_date,islevel,hit,vote,download1,download2,total_comment) values ('{$data['division']}','{$data['headnum']}','{$data['arrangenum']}','{$data['depth']}','{$data['prev_no']}','{$data['next_no']}','{$data['father']}','{$data['child']}','{$data['ismember']}','{$data['memo']}','{$data['ip']}','{$data['password']}','{$data['name']}','{$data['homepage']}','{$data['email']}','{$data['subject']}','{$data['use_html']}','{$data['reply_mail']}','{$data['category']}','{$data['is_secret']}','{$data['sitelink1']}','{$data['sitelink2']}','{$data['file_name1']}','{$data['file_name2']}','{$data['s_file_name1']}','{$data['s_file_name2']}','{$data['x']}','{$data['y']}','{$data['reg_date']}','{$data['islevel']}','{$data['hit']}','{$data['vote']}','{$data['download1']}','{$data['download2']}','{$data['total_comment']}')") or error(mysql_error());
 $no = mysql_insert_id();
 if (!$father) {
     $root_no = $no;
Exemplo n.º 3
0
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
	<td width="5" valign="top"></td><td></td><td width="5"></td>
</tr>
<tr height="600" valign="top">
    <td background="../imagenes/borde_izq_tabla.png">&nbsp;</td>
    <td>&nbsp;
	<!--Todo el contenido de cada página--->
	<?php 
menu_interno();
switch ($op) {
    case "por_division":
        por_division($f_division, $f_prce, $f_proyecto, $f_tipo, $depto, $division, $prce);
        break;
    case "add_division":
        add_division($f_division, $f_prce, $f_proyecto, $f_tipo, $depto, $division, $prce, $proyecto, $usuario);
        por_division($f_division, $f_prce, $f_proyecto, $f_tipo, $depto, $division, $prce);
        break;
    case "del_division":
        del_division($f_division, $f_prce, $f_proyecto, $f_tipo, $id_);
        por_division($f_division, $f_prce, $f_proyecto, $f_tipo, $depto, $division, $prce);
        break;
    case "de_produccion":
        de_produccion($f_division, $f_area, $f_proyecto, $division, $area);
        break;
    case "add_produccion":
        add_produccion($f_division, $f_area, $f_proyecto, $division, $area, $proyecto, $usuario);
        de_produccion($f_division, $f_area, $f_proyecto, $division, $area);
        break;
    case "del_produccion":
        del_produccion($f_division, $f_area, $f_proyecto, $id_);