$value){ if($num < $countIDs) $lbIDs .= $value . $commas; else $lbIDs .= $value . $emtcom; $num++; } $message = ''; $filePath = DOC_ROOT . 'admin/images/links/'; foreach($_POST['list_emails'] as $to){ $isAlready = attribValue("subscribers" , "email" , "where email = '". $to ."'"); if($isAlready == '' ) mysql_query("insert into subscribers (`email`) values ('". $to ."')"); $sql = "select title , big_image from links where id IN ($lbIDs)"; $res = mysql_query($sql); $files = array(); while($rows = mysql_fetch_assoc($res)){ $files[] = $rows['big_image']; $message .= $rows['title'] . "\n\n"; } $senderemail = attribValue("emails" , "sender_email" , "where `id` = 8"); $sendername = attribValue("emails" , "sender_name" , "where `id` = 8"); $sender = $sendername . $senderemail; $mailOK = multi_attach_mail($to, $subject , $files , $filePath , $sender , $message); if($mailOK) $mailSent = "Your SAVED LIST has been sent successfully!"; $mail_auto_responder = attribValue("general_settings" , "mail_auto_responder" , "where id = '1'"); if($mail_auto_responder) AutoMailResponder($to , 7); }//end foreach } //end post sendto if(isset($_GET["v"])){ $seo_name = $_GET["v"]; $sn_cat_id = attribValue("link_categories" , "id" , "where seo_name = '". $seo_name ."' "); $sn_sec_id = attribValue("link_categories" , "section_id" , "where seo_name = '". $seo_name ."' "); $_GET['category_id'] = $sn_cat_id; $_GET['section'] = $sn_sec_id; $sectionFirstCategory = $sn_cat_id; $_SESSION['LINK_CATEGORY_SELECTED'] = $sn_cat_id; $section_id = $_GET['section']; } if ( $section_id > 0 ) $section_filter = " AND category_id IN (select id from link_categories where section_id=$section_id) "; $pg_glow = 'none'; $first_category_id = attribValue("link_categories" , "id" , "limit 1"); $first_group_id = attribValue("links" , "group_id" , "limit 1"); //echo $sql; /*if ( $_GET['view'] != 'all' ) { $pageNum = isset($_GET['page']) ? $_GET['page'] : 1; $paging = generatePagingSite_Link($sql,ABSOLUTE_PATH . "links.html",$pageNum); //$sql = $sql . $paging['limit']; $sql = $sql; }*/ //echo $sql; $sql = "select * from links where group_id IN ( select id from link_groups where category_id = ". $sectionFirstCategory .")"; $_SESSION['LINK_CATEGORY_SELECTED'] = $sectionFirstCategory; $_SESSION['SELECTED_MENU_SECTION'] = $section_id; include_once("site_functions.php"); include_once("includes/header.php"); //loadLinkCategories(); ?>