0 ) { /////////////////////////// A REQUEST TO DELETE SOME CONTACTS /////////////// if(isset($_REQUEST["cnt"])) $cnt=$_REQUEST["cnt"]; if(isset($_REQUEST["cnt2"])) $cnt=$_REQUEST["cnt2"]; for($i=1;$i<=$cnt;$i++) { if ( isset($_REQUEST["checkbox" . $i]) ) //Is the checkbox ticked { if ($to_delete!="") { $to_delete.="," ; } //To insert comma?? $to_delete.= $_REQUEST["checkbox" . $i]; //Add another item to delete $items_removed++; } } //End For if ($to_delete=="") { $msg1=" Unable to remove inquiries. "; } else { $sql0=mysql_query("select * from b2b_messages where sb_id IN (" . $to_delete .")"); while($rs_t0=mysql_fetch_array($sql0)) { if($rs_t0["sb_fid"]==$_SESSION["b2b_userid"]) { $del_str=" update b2b_messages set sb_f_del='yes' where sb_id=".$rs_t0["sb_id"]; } if($rs_t0["sb_tid"]==$_SESSION["b2b_userid"]) { $del_str=" update b2b_messages set sb_t_del='yes' where sb_id=".$rs_t0["sb_id"]; } if($rs_t0["sb_tid"]==$rs_t0["sb_fid"]) { $del_str=" update b2b_messages set sb_t_del='yes', sb_f_del='yes' where sb_id=".$rs_t0["sb_id"]; } mysql_query($del_str); } $del_str=" Delete from b2b_messages where sb_f_del='yes' && sb_t_del='yes'"; mysql_query($del_str); $msg1= ($items_removed > 1)?$items_removed . " Inquiries have been removed":$items_removed . " Inquiry has been removed"; } header("Location:"." msg_confirm_mem.php?errmsg=".urlencode($msg1)); die(); /////////////////////////////CONTACTS HAVE BEEN REMOVED ///////////////////// } function main() { $null_char[0]=mysql_fetch_array(mysql_query("select sb_null_char from b2b_config")); $rs0_query=mysql_query("Select * from b2b_members,b2b_messages where b2b_messages.sb_fid=b2b_members.sb_id and sb_f_del='No' and sb_msg_read='No' and sb_fid =" .$_SESSION["b2b_userid"]); $rs0=mysql_num_rows($rs0_query); $outgoing_new_count=$rs0; $rs0_query=mysql_query("Select * from b2b_members,b2b_messages where b2b_messages.sb_fid=b2b_members.sb_id and sb_f_del='No' and sb_fid =" .$_SESSION["b2b_userid"]); $rs0=mysql_num_rows($rs0_query); $outgoing_count=$rs0; $rs0_query=mysql_query("Select * from b2b_members,b2b_messages where b2b_messages.sb_tid=b2b_members.sb_id and sb_t_del='No' and sb_msg_read='No' and sb_tid =" .$_SESSION["b2b_userid"]); $rs0=mysql_num_rows($rs0_query); $incoming_new_count=$rs0; $rs0_query=mysql_query("Select * from b2b_members,b2b_messages where b2b_messages.sb_tid=b2b_members.sb_id and sb_t_del='No' and sb_tid =" .$_SESSION["b2b_userid"]); $rs0=mysql_num_rows($rs0_query); $incoming_count=$rs0; $rs0_query=mysql_query("Select *,UNIX_TIMESTAMP(sb_onstamp) as t from b2b_members,b2b_messages where b2b_messages.sb_tid=b2b_members.sb_id and sb_t_del='No' and sb_tid =" .$_SESSION["b2b_userid"] . " order by b2b_messages.sb_id desc "); ?>
 收到的询价:
总数-  新:
要移除询价,请勾选该项,然后点击移除按钮
新的"; } else { $status="已读"; } $cnt++; ?>
标题 来自会员 收到日期 读否
50) { echo substr($rs0["sb_subject"], 0, strrpos( substr($rs0["sb_subject"], 0, 50),' ' )) . ".."; } else { echo $rs0["sb_subject"]; } ?>