0 ) { /////////////////////////// A REQUEST TO DELETE SOME CONTACTS /////////////// if(isset($_REQUEST["delete"])) { for($i=0;$i<=$_REQUEST["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="Please choose a group"; } else { $del_str=" Delete from sbjbs_mailalert_set where sb_id IN (" . $to_delete .")"; //echo $del_str; mysql_query($del_str); $msg1= $items_removed; $msg1.=($items_removed>1)?' Groups have':' Group has'; $msg1.=" been removed"; } } //edn if delete //=============insert if(isset($_REQUEST["insert"])) { $sb_cid=str_replace(";",",",$_REQUEST["cid_list"]); $sb_loc_id=str_replace(";",",",$_REQUEST["loc_id"]); $sb_uid=$_SESSION["sbjbs_userid"]; if($sb_cid==""){ $sb_cid=-1;} if($sb_loc_id==""){ $sb_loc_id=-1;} mysql_query("insert into sbjbs_mailalert_set (sb_uid,sb_cid,sb_loc_id) values ($sb_uid,'$sb_cid','$sb_loc_id') "); if(mysql_affected_rows()>0) { $msg1="Requested group has been added to your alert list"; } else { header("Location: gen_confirm_mem.php?err=manage_mail_alerts&errmsg=".urlencode(" Sorry, some error occurred and unable to add group to your alert list")); die(); } } //end if insert header("Location: gen_confirm_mem.php?errmsg=".urlencode($msg1)); die(); ///////////////////////////// } function main() { global $to_delete, $items_removed; $cat_list=""; $cid_list=""; $loc_id_list=""; $loc_list=""; $sbrow_con=mysql_fetch_array(mysql_query("select * from sbjbs_config")); $sb_cat_listing=$sbrow_con["sb_cat_listing"]; ?>
 Add New
Once you added a category- location group to your alerts then you will receive mail alerts upon posting of jobs in that group.
Leave blank if you want to choose all categories/locations
.
Choose Category  
Choose Location  
   
 
  Mail Alerts Groups
To remove a category just click the check box and click the remove button below.
"-1") { $cats_q=mysql_query("select * from sbjbs_categories where sb_id in (".$rs0["sb_cid"].")"); while($cats=mysql_fetch_array($cats_q)) { $cat_str=($cat_str=="")?$cats["sb_cat_name"]:$cat_str.",".$cats["sb_cat_name"]; } } else { $cat_str="All Categories"; } if($rs0["sb_loc_id"]<>"-1") { $locs_q=mysql_query("select * from sbjbs_locations where sb_id in (".$rs0["sb_loc_id"].")"); while($locs=mysql_fetch_array($locs_q)) { $loc_str=($loc_str=="")?$locs["sb_loc_name"]:$loc_str.",".$locs["sb_loc_name"]; } } else { $loc_str="All Locations"; } ?>
Select All
Categories:  
Locations: