assign('SEP_Forum_SE_Version', SEP_Forum_SE_Version); $SEPFLG = new SEP_Forum_Language(); $smarty->register_object('SEPFLG', $SEPFLG, null, false); $SEPFSQL = SEP_Forum_Mysql::getInstance(); $SEPFSQL->printQuery(false); $SEPFSQL->setResource(null); $SEPFSQL->setModelMap(array('User' => 'se_users', 'Profile' => 'se_profiles', 'Profilevalue' => 'se_profilevalues', 'Profilefield' => 'se_profilefields', 'Profilecat' => 'se_profilecats', 'Level' => 'se_levels', 'Subnet' => 'se_subnets', 'Languagevar' => 'se_languagevars', 'Languagevar2' => 'se_languagevars', 'EmailQueue' => 'se_forum_email_queue')); // IF YOU DO YOU OWN TRANSLATIONS FOR SOCIALENGINE VERSION 2 // ADD YOUR LANGUAGE TO THIS LIST! $languages_map_v2 = array( 'english' => 'en', 'german' => 'de' ); // @INFO: interface // $language_code = en|de|... if(SEP_Forum_SE_Version == 3) { $_language = SE_Language::info(); $language_code = $_language['language_code']; if(empty($language_code)) { $language_code = SE_Language::info('language_code'); } } else { $language_code = $languages_map_v2[$global_lang]; } define('SEP_Forum_language_code', $language_code); $_language_info = $SEPFSQL->query("SELECT language_id FROM se_languages WHERE (language_code='".mysql_real_escape_string($language_code)."') LIMIT 1"); $language_id = $_language_info['language_id']; define('SEP_Forum_language_id', $language_id); $SEPFLG->init(getcwd().'/locale', 'forum', $language_code); $_menu_settings = SEP_Forum_Models::get_forum_setting('show_in_my_apps', 'show_in_main_menu'); $show_in_my_apps = $_menu_settings['show_in_my_apps']; $show_in_main_menu = $_menu_settings['show_in_main_menu']; $url_style = SEP_Forum_Models::get_forum_setting('url_style'); // default|mod_rewrite $number_of_instances = $SEPFSQL->find('count', array('model' => 'Instance')); $multi_instances = $number_of_instances > 1; $SEPFURL = new SEP_Forum_Urls($multi_instances, null, $url_style); $smarty->register_object('SEPFURL', $SEPFURL, null, false); if($multi_instances) { // get all forum instances $instances = $SEPFSQL->find('all', array('model' => 'Instance', 'fields' => array('id', 'name'), 'conditions' => array('mode=?', array('forum')), 'order' => 'position ASC')); $smarty->assign('sep_forum_instances', $instances); // first instance_id for default forum home $instance_id = $instances[0]['Instance']['id']; } else { // forum is running in forum mode only $first_instance = $SEPFSQL->find('first', array('model' => 'Instance', 'fields' => array('id'), 'order' => 'position ASC')); $instance_id = $first_instance['Instance']['id']; // if multi_instances == false, set to default forum instance_id $smarty->assign('sep_forum_instance', $instance_id); } $global_instance_id = &$instance_id; // set to default, if no instance_id was set per $_GET for forum home if(SEP_Forum_SE_Version == 3) { $smarty->assign('sep_forum_show_menu_item', true); $smarty->assign('sep_forum_multiinstances', $multi_instances); SE_Language::_preload(18001005); if($show_in_my_apps) { $plugin_vars = !empty($plugin_vars) ? $plugin_vars : array(); $plugin_vars['menu_user'] = array(); $plugin_vars['menu_user']['file'] = $SEPFURL->url_for_forum_home($instance_id, $url_style); $plugin_vars['menu_user']['icon'] = '../forum/icon_navbar_main.gif'; $plugin_vars['menu_user']['title'] = 18001005; } if($show_in_main_menu) { $plugin_vars['menu_main'] = Array('file' => $SEPFURL->url_for_forum_home($instance_id, $url_style), 'title' => 18001005); } } else { // se v2 if($show_in_my_apps) { $smarty->assign('sep_v2_user_menu_url', $SEPFURL->url_for_forum_home($instance_id, $url_style)); $smarty->assign('sep_v2_user_menu_img', '../forum/icon_navbar_main.gif'); $smarty->assign('sep_v2_user_menu_lang', 'Forum'); $smarty->assign('sep_v2_user_menu_show', true); } else { $smarty->assign('sep_v2_user_menu_show', false); } } // register function to decode post string $smarty->register_function('sep_forum_text_decode', array('SEP_Forum_Helper', 'text_decode')); $smarty->register_function('sep_forum_display_name', array('SEP_Forum_Helper', 'display_name')); $smarty->register_function('sep_forum_get_rating', array('SEP_Forum_Helper', 'get_rating')); $smarty->register_function('sep_forum_get_small_pagination_for_topic', array('SEP_Forum_Helper', 'small_pagination_for_topic')); $smarty->register_function('sep_forum_parse_additional_table_fields', array('SEP_Forum_Helper', 'parse_additional_table_fields')); $smarty->register_modifier('sep_forum_is_in_list', array('SEP_Forum_Helper', 'is_id_in_list')); global $params; $params = array(); if($page == "profile") { // Connect to API on profile page require_once getcwd().'/include/forum/api/impl/profile.php'; } // set login before last login if(empty($_COOKIE['SEP_Forum_before_last_login_date'])) { setcookie("SEP_Forum_before_last_login_date", $user->user_info['user_lastlogindate'], time()+3600*24*90, "/"); } elseif($_COOKIE['SEP_Forum_last_login_date'] != $user->user_info['user_lastlogindate'] && $_COOKIE['SEP_Forum_last_login_date'] != $_COOKIE['SEP_Forum_before_last_login_date']) { setcookie("SEP_Forum_before_last_login_date", $_COOKIE['SEP_Forum_last_login_date'], time()+3600*24*90, "/"); SEP_Forum_Helper::reset_topic_reads(); } // set last login if(empty($_COOKIE['SEP_Forum_last_login_date']) || $_COOKIE['SEP_Forum_last_login_date'] < $user->user_info['user_lastlogindate']) { setcookie("SEP_Forum_last_login_date", $user->user_info['user_lastlogindate'], time()+3600*24*90, "/"); } // delete attachments $delete_attachments = $SEPFSQL->find('all', array('model' => 'Attachment', 'fields' => array('Attachment.user_id', 'Attachment.post_id', 'Attachment.id', 'Attachment.filename'), 'conditions' => 'is_deleted=1', 'limit' => 5)); $_delete_attachments_ids = array(); foreach($delete_attachments as $attachment) { @unlink(getcwd().'/uploads_forum/'.$attachment['user_id'].'/'.$attachment['post_id'].'/'.$attachment['filename']); if(!empty($attachment['id'])) { $_delete_attachments_ids[] = $attachment['id']; } } if(!empty($_delete_attachments_ids) && is_array($_delete_attachments_ids) && count($_delete_attachments_ids) > 0) { $SEPFSQL->raw_query('DELETE FROM se_forum_attachments WHERE id IN ('.implode(',', $_delete_attachments_ids).') LIMIT 5'); } unset($delete_attachments); unset($_delete_attachments_ids); // TRIGGER EMAIL QUEUE $forum_settings = SEP_Forum_Models::get_forum_setting('email_queue_send_limit', 'email_queue_delay', 'email_queue_last_sent'); if(empty($forum_settings['email_queue_last_sent']) || strtotime($forum_settings['email_queue_last_sent']) < time()-($forum_settings['email_queue_delay']*60)) { $emails = $SEPFSQL->find('all', array('model' => 'EmailQueue', 'limit' => $forum_settings['email_queue_send_limit'], 'order' => 'priority DESC')); if(!empty($emails[0]['EmailQueue'])) { $delete_ids = array(); foreach($emails as $email) { $delete_ids[] = $email['EmailQueue']['id']; SEP_Forum_Helper::send_raw_email($email['EmailQueue']['email'], $email['EmailQueue']['subject'], $email['EmailQueue']['body']); } if(!empty($delete_ids[0])) { $delete_ids = implode(',', $delete_ids); $SEPFSQL->raw_query("DELETE FROM se_forum_email_queue WHERE id IN ($delete_ids)"); } } $SEPFSQL->update('Setting', array('value' => 'CURRENT_TIMESTAMP()'), array('id=?', array('email_queue_last_sent'))); } unset($delete_ids); unset($emails); unset($forum_settings); // number of items per page setting define('sep_forum_items_per_page', SEP_Forum_Models::get_forum_setting('items_per_page')); /** * Global method to determine if a multidimensional array is really empty * @return true, if array is empty * @param array $array array to check */ function sepf_aempty($array) { if ( empty($array)) { return true; } if (count($array, COUNT_RECURSIVE) === 0) { return true; } return false; } if(SEP_Forum_SE_Version == 3) { // add stats to "NETWORK STATISTICS" in home.tpl SE_Hook::register('se_site_statistics', array('SEP_Forum_Helper', 'get_forum_stats_for_home')); } ?> Healthy Friendships
Search:
Advanced Search
Member Login
Email:
Password:
 
Network Statistics
• Members: 666 members
• Friendships: 36 friends
• Comments: 40 comments
People Online (1)
1 guest(s)
Members Last Logged In
Healthy Friendships is dedicated to helping you meet people who have found health solutions that work.


Ask questions. Get tips. Make friends. Invite your friends.


People helping people. Naturally!


Access to information on this site is only available to registered members.


Singup today for a FREE membership!


Next contact the member web site from which you just came and ask that company to have your new account verified and unlocked.


Its that easy. You will be inside our community in just a few minutes. See you soon!

Newest Members
Popular Members
David

11 friends
Ian

5 friends
Nick

4 friends
Edith

2 friends