crf1121359 Posted November 11, 2012 Share Posted November 11, 2012 Hello, Please bear with me as I have limited knowledge in PHP. I have a php file and I need to place a simple jquery pop-up in it. could someone please help me out with this? here is the php file: <?php /** * User homepage (information about user billing, profile, profile visits, user perfect matches, horoscope...) * * @package DatingPro * @subpackage User Mode **/ include "./include/config.php"; include "./common.php"; include "./include/config_index.php"; include "./include/functions_index.php"; include "./include/functions_auth.php"; include "./include/functions_users.php"; include "./include/class.lang.php"; include "./include/class.news.php"; include_once "./include/class.percent.php"; include "./include/functions_poll.php"; if (file_exists("./poll/poll_cookie.php")) include "./poll/poll_cookie.php"; include "./include/functions_events.php"; CheckInstallFolder(); $smarty->assign("sub_menu_num", '2'); $user = auth_index_user(); RefreshAccount($user); ///// check ins messages if user not guest if($user[3] != 1){ GetAlertsMessage(); } $profile_percent = new Percent($config, $dbconn, $user[0]); $multi_lang = new MultiLang($config, $dbconn); ///// default multilanguage field for select $field_name = $multi_lang->DefaultFieldName(); if(isset($_SERVER["PHP_SELF"])) $file_name = AfterLastSlash($_SERVER["PHP_SELF"]); else $file_name = "homepage.php"; lastViewed(); unset($_SESSION['return_to_view']); if($user[4]==1){ HomePage(); }elseif($user[0] && $user[3]!=1){ HomePage(); }else{ echo "<script>location.href='".$config["site_root"]."/index.php'</script>"; } function HomePage(){ global $settings, $lang, $config, $config_index, $smarty, $dbconn, $user, $multi_lang, $field_name, $profile_percent, $file_name, $theme_ident; Banners(GetRightModulePath(__FILE__)); LeftMenu(); IndexHomePage(); $smarty->assign("file_name",$file_name); cleanMailbox(); ////////// visited $settings = GetSiteSettings(array('icons_folder', 'zip_count', 'max_age_limit', 'min_age_limit', 'icon_male_default', 'icon_female_default', 'icons_folder', 'site_unit_costunit', 'use_horoscope_feature', 'free_site', 'use_pilot_module_organizer','use_lift_up_in_search_service')); $default_photos['1'] = $settings['icon_male_default']; $default_photos['2'] = $settings['icon_female_default']; ///// user info $smarty->assign("active_user_info", GetActiveUserInfo($user)); ///////////// icon $strSQL = "SELECT DISTINCT a.id, a.login, a.gender, a.date_birthday, a.big_icon_path, a.id_country, a.id_city, a.id_region, DATE_FORMAT(a.date_registration,'".$config["date_format"]."') as date_registration, DATE_FORMAT(a.date_last_seen,'".$config["date_format"]."') as date_last_login FROM ".USERS_TABLE." a WHERE a.id='".$user[0]."'"; $rs = $dbconn->Execute($strSQL); $i = 0; $row = $rs->GetRowAssoc(false); $page["name"] = $row["login"]; $page["age"] = AgeFromBDate($row["date_birthday"]); $page["date_registration"] = $row["date_registration"]; $page["last_login"] = $row["date_last_login"]; $page["complete"] = $profile_percent->GetAllPercent(); $icon_path = $row["big_icon_path"]; if($icon_path && file_exists($config["site_path"].$settings["icons_folder"]."/".$icon_path)) $page["icon_path"] = $config["site_root"].$settings["icons_folder"]."/".$icon_path; $icon_image = $icon_path ? 1 : 0; $page["id_country"] = intval($row["id_country"]); $page["id_region"] = intval($row["id_region"]); $page["id_city"] = intval($row["id_city"]); $strSQL = "SELECT COUNT(*) FROM ".USER_UPLOAD_TABLE." WHERE id_user='".$row["id"]."' AND upload_type='f' AND status='1' AND allow in ('1', '2')"; $rs_sub = $dbconn->Execute($strSQL); $page["photo_count"] = intval($rs_sub->fields[0])+$icon_image; $_LANG_NEED_ID["country"][] = intval($row["id_country"]); $_LANG_NEED_ID["region"][] = intval($row["id_region"]); $_LANG_NEED_ID["city"][] = intval($row["id_city"]); ///////////// icon //// matches if ($config["social"] == 1){ $strSQL = " SELECT a.id, a.login, a.gender, a.date_birthday, a.icon_path, a.id_country, a.id_city, a.id_region FROM ".USERS_TABLE." a, ".USER_TOPTEN_TABLE." b WHERE a.id=b.id_user AND a.status='1' ORDER BY RAND() LIMIT 1"; $rs = $dbconn->Execute($strSQL); $row = $rs->GetRowAssoc(false); $top_users["name"] = $row["login"]; $top_users["age"] = AgeFromBDate($row["date_birthday"]); $top_users["link"] = "./viewprofile.php?id=".$row["id"]."&sel=5"; $icon_path = $row["icon_path"]?"big_".$row["icon_path"]:$default_photos[$row["gender"]]; $icon_image= (strlen($row["icon_path"]))?1:0; if($icon_path && file_exists($config["site_path"].$settings["icons_folder"]."/".$icon_path)) $top_users["icon_path"] = $config["site_root"].$settings["icons_folder"]."/".$icon_path; $top_users["country"] = $dbconn->GetOne("SELECT name FROM ".COUNTRY_SPR_TABLE." WHERE id='".intval($row["id_country"])."'"); $top_users["region"] = $dbconn->GetOne("SELECT name FROM ".REGION_SPR_TABLE." WHERE id='".intval($row["id_region"])."'"); $top_users["city"] = $dbconn->GetOne("SELECT name FROM ".CITY_SPR_TABLE." WHERE id='".intval($row["id_city"])."'"); $_LANG_NEED_ID["country"][] = intval($row["id_country"]); $_LANG_NEED_ID["region"][] = intval($row["id_region"]); $_LANG_NEED_ID["city"][] = intval($row["id_city"]); $smarty->assign("top_users", $top_users); } ///// if user's perfect match is empty $descr_perc = $profile_percent->GetSectionPercent(6); $interests_perc = $profile_percent->GetSectionPercent(7); ////// $descr_perc ~ 70%, $interests_perc ~ 30% /// this is avg percent if $summ_all< 75 user must fill his perfect mach section $summ_all = round($descr_perc*0.7 + $interests_perc*0.3); $hotlist["match_count"] = 0; if($summ_all >= 75){ $match_arr = GetPerfectUsersList($user[0]); $hotlist["match_count"] = isset($match_arr["id_arr"])?count($match_arr["id_arr"]):0; if(isset($match_arr["id_arr"]) && is_array($match_arr["id_arr"])){ $user_arr["id_arr"] = (count($match_arr["id_arr"])<4)?$match_arr["id_arr"]:array_slice($match_arr["id_arr"], 0, 4); $user_str = implode(", ", $user_arr["id_arr"]); }else{ $user_str = "''"; } $strSQL = "SELECT DISTINCT a.id, a.login, a.gender, a.date_birthday, a.icon_path, a.id_country, a.id_city, a.id_region FROM ".USERS_TABLE." a where a.id in (".$user_str.") group by a.id"; $rs = $dbconn->Execute($strSQL); $i = 0; $visited = array(); while(!$rs->EOF){ $row = $rs->GetRowAssoc(false); $visited[$i]["name"] = $row["login"]; $visited[$i]["age"] = AgeFromBDate($row["date_birthday"]); $visited[$i]["link"] = "./viewprofile.php?id=".$row["id"]; $icon_path = $row["icon_path"]?$row["icon_path"]:$default_photos[$row["gender"]]; $icon_image= (strlen($row["icon_path"]))?1:0; if($icon_path && file_exists($config["site_path"].$settings["icons_folder"]."/".$icon_path)) $visited[$i]["icon_path"] = $config["site_root"].$settings["icons_folder"]."/".$icon_path; $visited[$i]["id_country"] = intval($row["id_country"]); $visited[$i]["id_region"] = intval($row["id_region"]); $visited[$i]["id_city"] = intval($row["id_city"]); $strSQL = "SELECT COUNT(*) FROM ".USER_UPLOAD_TABLE." WHERE id_user='".$row["id"]."' AND upload_type='f' AND status='1' AND allow in ('1', '2')"; $rs_sub = $dbconn->Execute($strSQL); $visited[$i]["photo_count"] = intval($rs_sub->fields[0])+$icon_image; $_LANG_NEED_ID["country"][] = intval($row["id_country"]); $_LANG_NEED_ID["region"][] = intval($row["id_region"]); $_LANG_NEED_ID["city"][] = intval($row["id_city"]); $rs->MoveNext(); $i++; } $smarty->assign("visited", $visited); } // } $profile["edit_link"]="myprofile.php"; ////// links $profile["addf_link"]="myprofile.php?sel=4"; $profile["adda_link"]="myprofile.php?sel=4"; $profile["addv_link"]="myprofile.php?sel=4"; $account["units"] = $settings["site_unit_costunit"]; $strSQL = "SELECT account_curr from ".BILLING_USER_ACCOUNT_TABLE." where id_user = '".$user[0]."'"; $rs = $dbconn->Execute($strSQL); $account["account"] = round($rs->fields[0], 2); $account["buy_link"] = "./payment.php?sel=update_account"; $account["sign_link"] = "./account.php#info"; $account["alert_link"] = "./account.php#alerts"; $account["news_link"] = "./account.php#news"; if (isset($settings['use_lift_up_in_search_service']) && $settings['use_lift_up_in_search_service'] == 1) { $account["lift_up_link"] = "./payment.php?sel=service&service=lift_up"; } $profile["perfect_match_link"] = "./perfect_match.php"; $hotlist["visit_link"] = $config["site_root"].$config_index["leftmenu_path"][8]; $hotlist["meetme_link"] = $config["site_root"].$config_index["leftmenu_path"][10]; $hotlist["kiss_me_link"] = $config["site_root"].$config_index["leftmenu_path"][14]; $hotlist["emailed_me_link"] = $config["site_root"]."/mailbox.php?sel=inbox"; $hotlist["perfect_link"] = $config["site_root"].$config_index["leftmenu_path"][7]; $hotlist["meetthem_link"] = $config["site_root"].$config_index["leftmenu_path"][9]; $hotlist["kiss_them_link"] = $config["site_root"].$config_index["leftmenu_path"][15]; $hotlist["emailed_them_link"] = $config["site_root"]."/mailbox.php?sel=outbox"; $rs = $dbconn->Execute("Select COUNT(id) from ".MAILBOX_TABLE." where id_to='".$user[0]."' and deleted_to='0' "); $hotlist["emailed_me_count"] = intval($rs->fields[0]); $rs = $dbconn->Execute("Select COUNT(id) from ".MAILBOX_TABLE." where id_to='".$user[0]."' and was_read='0' and deleted_to='0' "); $hotlist["emailed_me_new_count"] = intval($rs->fields[0]); $rs = $dbconn->Execute("Select COUNT(id) from ".MAILBOX_TABLE." where id_from='".$user[0]."' "); $hotlist["emailed_them_count"] = intval($rs->fields[0]); $rs = $dbconn->Execute("Select count(distinct a.id_from) from ".KISSLIST_TABLE." as a left join ".USERS_TABLE." as b on b.id=a.id_to where a.id_from!='".$user[0]."' and a.id_to ='".$user[0]."' and b.status='1' and b.guest_user='0'"); $hotlist["kiss_me_count"] = intval($rs->fields[0]); $rs = $dbconn->Execute("Select count(distinct a.id_to) from ".KISSLIST_TABLE." as a left join ".USERS_TABLE." as b on b.id=a.id_to where a.id_from='".$user[0]."' and a.id_to !='".$user[0]."' and b.status='1' and b.guest_user='0'"); $hotlist["kiss_them_count"] = intval($rs->fields[0]); $rs = $dbconn->Execute("Select count(distinct id_visiter) from ".PROFILE_VISIT_TABLE." left join ".USERS_TABLE." on id=id_visiter where id_visiter!='".$user[0]."' and id_user='".$user[0]."' and status='1' and visible='1' and guest_user='0'"); $hotlist["visit_count"] = intval($rs->fields[0]); $meet_them_arr = GetWantToMeetThemList($user[0], false); $hotlist["meet_them_count"] = isset($meet_them_arr["id_arr"]) ? count($meet_them_arr["id_arr"]) : 0; $meet_me_arr = GetWantToMeetMeList($user[0], true); $hotlist["meet_me_count"] = isset($meet_me_arr["id_arr"]) ? count($meet_me_arr["id_arr"]) : 0; $use_refer_friend_feature = GetSiteSettings("use_refer_friend_feature"); if ($use_refer_friend_feature){ $hotlist["referred_link"] = $config["server"].$config["site_root"]."/quick_search.php?sel=search_referred"; $hotlist["referred_count"] = GetCountReferredFriends($user[0]); $smarty->assign("user_refer_frends",GetUserReferCode($user[0])); } ////// if user status = 0 if(!$user[8]) { $form["err"] = $lang["home_page"]["alert_header_status"]; $strSQL = "select confirm from ".USERS_TABLE." where id = '".$user[0]."'"; $rs = $dbconn->Execute($strSQL); if(!$rs->fields[0]) $form["err"] .= "<br>".$lang["home_page"]["alert_header_confirm"]; } $form["use_horoscope"] = ($settings["use_horoscope_feature"]) ? true : false; $rs = $dbconn->Execute("select DATE_FORMAT(date_birthday,'%m'), DATE_FORMAT(date_birthday,'%d') from ".USERS_TABLE." where id='".$user[0]."'"); $birth_month = $rs->fields[0]; $birth_day = $rs->fields[1]; $rs = $dbconn->Execute("select id from ".HOROSCOPE_SIGNS_TABLE." where DATE_FORMAT(date_start,'%m')=".$birth_month." and DATE_FORMAT(date_start,'%d')<=".$birth_day); if ($rs->fields[0]) { $sign = $rs->fields[0]; } else { $rs = $dbconn->Execute("select id from ".HOROSCOPE_SIGNS_TABLE." where DATE_FORMAT(date_end,'%m')=".$birth_month." and DATE_FORMAT(date_end,'%d')>=".$birth_day); $sign = $rs->fields[0]; } $rs = $dbconn->Execute("select id, name from ".HOROSCOPE_SIGNS_TABLE); $i = 0; while(!$rs->EOF){ $row = $rs->GetRowAssoc(false); $horoscope[$i]["sign_name"] = $lang["horoscope"][$row["name"]]["name"]; $horoscope[$i]["sign_link"] = "./horoscope.php?sel=view&sign=".$row["name"]; if ($sign == $row["id"]) $horoscope[$i]["my_sign"] = 1; $rs->MoveNext(); $i++; } $smarty->assign("horoscope", $horoscope); $form["use_account"] = ($settings["free_site"]) ? false : true; $spr_arr = array(); //// search table $strSQL = "select distinct id, name from ".COUNTRY_SPR_TABLE." order by name"; $rs = $dbconn->Execute($strSQL); $i=0; while(!$rs->EOF){ $row = $rs->GetRowAssoc(false); $spr_arr[$i]["id"] = $row["id"]; $spr_arr[$i]["name"] = $row["name"]; if ($page["id_country"] == $spr_arr[$i]["id"]) { $spr_arr[$i]["sel"] = 1; } $rs->MoveNext(); $i++; } $smarty->assign("countries", $spr_arr); $spr_arr = array(); $strSQL = "select distinct id, name from ".REGION_SPR_TABLE." where id_country='".$page["id_country"]."' order by id"; $rs = $dbconn->Execute($strSQL); $i=0; $spr_arr = array(); while(!$rs->EOF){ $row = $rs->GetRowAssoc(false); $spr_arr[$i]["id"] = $row["id"]; $spr_arr[$i]["name"] = stripslashes($row["name"]); if ($page["id_region"] == $spr_arr[$i]["id"]) $spr_arr[$i]["sel"] = 1; $rs->MoveNext(); $i++; } $smarty->assign("regions", $spr_arr); $spr_arr = array(); $strSQL = "select distinct id, name from ".CITY_SPR_TABLE." where id_region='".$page["id_region"]."' order by id"; $rs = $dbconn->Execute($strSQL); $i=0; $spr_arr = array(); while(!$rs->EOF){ $row = $rs->GetRowAssoc(false); $spr_arr[$i]["id"] = $row["id"]; $spr_arr[$i]["name"] = stripslashes($row["name"]); if ($page["id_city"] == $spr_arr[$i]["id"]) $spr_arr[$i]["sel"] = 1; $rs->MoveNext(); $i++; } $smarty->assign("cities", $spr_arr); $strSQL = " SELECT a.gender, b.gender as gender_search, b.couple as couple_search, b.age_min, b.age_max, b.id_relationship FROM ".USERS_TABLE." as a, ".USER_MATCH_TABLE." as b where b.id_user=a.id AND a.id='".$user[0]."'"; $rs = $dbconn->Execute($strSQL); $row = $rs->GetRowAssoc(false); $data["gender_1"] = $row["gender"]; $data["gender_2"] = $row["gender_search"]; $data["couple_2"] = $row["couple_search"]; $data["age_min"] = $row["age_min"]; $data["age_max"] = $row["age_max"]; if ($row["id_relationship"] !='' && $row["id_relationship"] !='0') { $data["arr_relationship"] = explode(',',$row["id_relationship"]); } else { $data["arr_relationship"] = 0; } $gender_arr[0]["id"] = '1'; $gender_arr[0]["name"] = $lang["gender"]["1"]; $gender_arr[0]["name_search"] = $lang["gender_search"]["1"]; $gender_arr[0]["sel"] = intval($data["gender_1"]) == 1 ? 1 : 0; $gender_arr[0]["sel_search"] = intval($data["gender_2"]) == 1 ? 1 : 0; $gender_arr[1]["id"] = '2'; $gender_arr[1]["name"] = $lang["gender"]["2"]; $gender_arr[1]["name_search"] = $lang["gender_search"]["2"]; $gender_arr[1]["sel"] = intval($data["gender_1"]) == 2 ? 1 : 0; $gender_arr[1]["sel_search"] = intval($data["gender_2"]) == 2 ? 1 : 0; $smarty->assign("gender", $gender_arr); $form["zip_count"] = $settings["zip_count"]; $max_age = $settings["max_age_limit"]; $min_age = $settings["min_age_limit"]; $max_age_arr = range(intval($max_age), intval($min_age)); $smarty->assign("age_max", $max_age_arr); $min_age_arr = range(intval($min_age), intval($max_age)); $smarty->assign("age_min", $min_age_arr); //// relationships select $strSQL = "select distinct a.id, b.".$field_name." as name from ".RELATION_SPR_TABLE." a left join ".REFERENCE_LANG_TABLE." b on b.table_key='".$multi_lang->TableKey(RELATION_SPR_TABLE)."' and b.id_reference=a.id order by a.sorter "; $rs = $dbconn->Execute($strSQL); $i = 0; while(!$rs ->EOF){ $row = $rs->GetRowAssoc(false); $relation_arr[$i]["id"] = $row["id"]; $relation_arr[$i]["name"] = $row["name"]; if ( is_array($data["arr_relationship"]) && in_array($relation_arr[$i]["id"], $data['arr_relationship']) ) { $relation_arr[$i]["sel"] = 1; } else { $relation_arr[$i]["sel"] = 0; } $rs->MoveNext(); $i++; } $smarty->assign("relation", $relation_arr); //// distance select $strSQL = "select id, name, type from ".DISTANCE_SPR_TABLE." order by type, name desc"; $rs = $dbconn->Execute($strSQL); $i=0; while(!$rs->EOF){ $row = $rs->GetRowAssoc(false); $distances_arr[$i]["id"] = $row["id"]; $distances_arr[$i]["name"] = $row["name"]; $distances_arr[$i]["type"] = ($row["type"] == "mile") ? $lang["distance"]["mile"] : $lang["distance"]["km"]; $rs->MoveNext(); $i++; } $smarty->assign("distances", $distances_arr); $form["search_action"] = "./quick_search.php"; $form["search_hiddens"] = "<input type=hidden name=sel value='search'>"; $form["search_hiddens"] .= "<input type=hidden name=flag_country value='0'>"; if ($config['social'] == 1 || (isset($config['use_pilot_module_club']) && $config['use_pilot_module_club'] == 1)) { GetUserClubs($user[0]); } $place = GetUserRatingPlace($user[0]); if ($place != null) { $form['place'] = $place; } if (isset($settings['use_pilot_module_organizer']) && $settings['use_pilot_module_organizer'] == 1) { $strSQL = " SELECT id, area_1, area_2, area_3, area_4, area_5, area_6, area_7, area_8, area_9 FROM ".ORG_USER_HOME_OPTIONS_TABLE." WHERE id_user='".$user[0]."' "; $rs = $dbconn->Execute($strSQL); if ($rs->fields[0]>0) { $org_home[0] = ($rs->fields[1] == 1)? 'true': 'false'; $org_home[1] = ($rs->fields[2] == 1)? 'true': 'false'; $org_home[2] = ($rs->fields[3] == 1)? 'true': 'false'; $org_home[3] = ($rs->fields[4] == 1)? 'true': 'false'; $org_home[4] = ($rs->fields[5] == 1)? 'true': 'false'; $org_home[5] = ($rs->fields[6] == 1)? 'true': 'false'; $org_home[6] = ($rs->fields[7] == 1)? 'true': 'false'; $org_home[7] = ($rs->fields[8] == 1)? 'true': 'false'; $org_home[8] = ($rs->fields[9] == 1)? 'true': 'false'; } else { $org_home = array('true','true','true','true','true','true','true','true','true'); } $smarty->assign("org_home", $org_home); $smarty->assign("hide", 1); } if ($config["color_theme"] == 'niche') { GetLastUploades(); } if ($config["color_theme"] == "adult" || $config["color_theme"] == "gay" || $config["color_theme"] == "lesby" || $config["color_theme"] == "matrimonial" || $config["color_theme"] == "niche") { $smarty->assign("new_users", GetNewUsers()); } $smarty->assign("base_lang", GetBaseLang($_LANG_NEED_ID)); $smarty->assign("hotlist", $hotlist); $smarty->assign("news", HomepageNews()); $smarty->assign("poll_bar", PollBar()); $smarty->assign("events", EventsMain()); $smarty->assign("page", $page); $smarty->assign("account", $account); $smarty->assign("profile", $profile); $smarty->assign("form", $form); $smarty->assign("data", $data); $smarty->assign("section", $lang["section"]); $smarty->assign("header", $lang["homepage"]); $smarty->assign('script', 'location'); /* if ( isset($config['use_pilot_module_organizer']) && ( $config['use_pilot_module_organizer']==1 ) ) { $strSQL = " SELECT id, home_area_color, menu_back_1_color, menu_back_2_color, menu_back_3_color, menu_back_4_color, menu_font_1_color, menu_font_2_color, menu_font_3_color, menu_font_4_color, link_color, header_color, content_color, search_color, shoutbox_color, main_text_color, big_bg_color, bg_picture_path FROM ".ORG_USER_LAYOUTS_TABLE." WHERE id_user='".intval($user[0])."' "; $rs = $dbconn->Execute($strSQL); if ($rs->fields[0]>0) { $row = $rs->GetRowAssoc(false); if ($row["home_area_color"] != "") { $color["home_menu"] = $row["home_area_color"]; } if ($row["shoutbox_color"] != "") { $color["shoutbox_color"] = $row["shoutbox_color"]; $_SESSION["shoutbox_color_my"] = $row["shoutbox_color"]; } if ($row["menu_back_1_color"] != "") { $color["menu_block_1"] = $row["menu_back_1_color"]; } if ($row["menu_back_2_color"] != "") { $color["menu_block_2"] = $row["menu_back_2_color"]; } if ($row["menu_back_3_color"] != "") { $color["menu_block_3"] = $row["menu_back_3_color"]; } if ($row["menu_back_4_color"] != "") { $color["menu_block_4"] = $row["menu_back_4_color"]; } if ($row["menu_font_1_color"] != "") { $color["menu_link_1"] = $row["menu_font_1_color"]; } if ($row["menu_font_2_color"] != "") { $color["menu_link_2"] = $row["menu_font_2_color"]; } if ($row["menu_font_3_color"] != "") { $color["menu_link_3"] = $row["menu_font_3_color"]; } if ($row["menu_font_4_color"] != "") { $color["menu_link_4"] = $row["menu_font_4_color"]; } if ($row["link_color"] != "") { $color["link"] = $row["link_color"]; } if ($row["header_color"] != "") { $color["header"] = $row["header_color"]; } if ($row["content_color"] != "") { $color["content"] = $row["content_color"]; } if ($row["search_color"] != "") { $color["home_search"] = $row["search_color"]; } if ($row["big_bg_color"] != "") { $color["bg_color"] = $row["big_bg_color"]; } if ($row["main_text_color"] != "") { $color["main_text_color"] = $row["main_text_color"]; } if ($row["bg_picture_path"] != "") { $settings = GetSiteSettings( array("photos_folder")); $color["bg_picture_path"] = $config['site_root'].$settings["photos_folder"]."/".$row["bg_picture_path"]; } $smarty->append("css_color", $color, true); $smarty->assign("customised", "1"); $smarty->assign("id_customed", $user[0]); } else { unset($_SESSION["shoutbox_color_my"]); } } else { unset($_SESSION["shoutbox_color_my"]); } */ $smarty->display(TrimSlash($config["index_theme_path"])."/homepage_table".$config["theme_postfix"].".tpl"); exit; } function HomepageNews(){ /////// return array for smarty global $lang, $config, $config_index, $smarty, $dbconn, $user; if ($config["color_theme"] == "niche") { $config_index["news_homepage_numpage"] = 3; } $news = GetLastNews($config_index["news_homepage_numpage"]); if (is_array($news) && sizeof($news)>0) { foreach($news as $key=>$n){ $news[$key]["text"] = strip_tags($n["title"]); if(!strlen(utf8_decode($news[$key]["text"]))) $news[$key]["text"] = utf8_substr(strip_tags($n["news_text"]), 0, 100)."..."; $news[$key]["date"] = $n["date_add"]; $news[$key]["link_read"] = GetNewsReadLink($n["id"]); } return $news; } else { return; } } function GetUserClubs($id_user) { global $lang, $config, $config_index, $smarty, $dbconn, $user; $file_name = "club.php"; $settings = GetSiteSettings(array('show_users_connection_str','show_users_comments','show_users_group_str','photos_default','club_uploads_folder','thumb_max_width')); $strSQL = " SELECT DISTINCT id_club FROM ".CLUB_USERS_TABLE." WHERE id_user='".$id_user."' GROUP BY id_club LIMIT 0,4 "; $rs = $dbconn->Execute($strSQL); $num_records = $rs->RowCount(); if ($num_records>0){ $id_arr = array(); while(!$rs->EOF){ array_push($id_arr, $rs->fields[0]); $rs->MoveNext(); } $id_str = implode(",", $id_arr); } if ($num_records>0) { $strSQL = " SELECT DISTINCT ct.id, ct.name as club_name, cct.name as category, cut.upload_path, ct.id_creator as leader_id, ct.is_open FROM ".CLUB_TABLE." ct LEFT JOIN ".CLUB_CATEGORIES_TABLE." cct on cct.id=ct.id_category LEFT JOIN ".CLUB_UPLOADS_TABLE." cut ON (cut.id_club=ct.id AND cut.club_icon='1' AND cut.status='1' AND cut.upload_type='f') WHERE ct.id IN (".$id_str.") GROUP BY ct.id ORDER BY ct.id DESC "; $rs = $dbconn->Execute($strSQL); $i = 0; $clubs = array(); while(!$rs->EOF){ $row = $rs->GetRowAssoc(false); $clubs[$i]["id"] = $row["id"]; $clubs[$i]["club_name"] = stripslashes($row["club_name"]); $clubs[$i]["category"] = stripslashes($row["category"]); $clubs[$i]["is_open"] = $row["is_open"]; if ($row["leader_id"] == $id_user){ $clubs[$i]["user_is_leader"] = 1; } $icon_path = $row["upload_path"]?$row["upload_path"]:$settings["photos_default"]; if($icon_path && file_exists($config["site_path"].$settings["club_uploads_folder"]."/thumb_".$icon_path)){ $clubs[$i]["icon_path"] = $config["site_root"].$settings["club_uploads_folder"]."/thumb_".$icon_path; } else { $clubs[$i]["icon_path"] = $config["server"].$config["site_root"].$settings["club_uploads_folder"]."/".$settings["photos_default"]; } $clubs[$i]["link"] = $file_name."?sel=club&id_club=".$clubs[$i]["id"]; $strSQL = "SELECT id FROM ".CLUB_USERS_TABLE." WHERE id_club='".$clubs[$i]["id"]."' AND id_user='".$id_user."' " ; $rs_c = $dbconn->Execute($strSQL); if ($rs_c->fields[0]>0){ $clubs[$i]["user_in_club"] = 1; } else { $clubs[$i]["user_in_club"] = 0; } $rs->MoveNext(); $i++; } $smarty->assign("clubs", $clubs); } else { $smarty->assign("clubs", 'empty'); } return ; } function GetNewUsers($limit=10){ global $dbconn, $settings, $config, $default_photos; $strSQL = "SELECT DISTINCT id, icon_path, login FROM ".USERS_TABLE." WHERE status='1' AND root_user = '0' AND guest_user='0' AND icon_path!='' ORDER BY date_registration DESC LIMIT 0,".$limit; $rs = $dbconn->Execute($strSQL); $i = 0; while(!$rs->EOF){ $row = $rs->GetRowAssoc(false); $new_users[$i]["link"] = "./viewprofile.php?id=".$row["id"]; $new_users[$i]["login"] = $row["login"]; $icon_path = $row["icon_path"]?$row["icon_path"]:$default_photos[$row["gender"]]; $icon_image= (strlen($row["icon_path"]))?1:0; $config["site_path"].$settings["icons_folder"]."/".$icon_path; if($icon_path && file_exists($config["site_path"].$settings["icons_folder"]."/".$icon_path)) $new_users[$i]["icon_path"] = $config["site_root"].$settings["icons_folder"]."/".$icon_path; $strSQL = "SELECT COUNT(*) FROM ".USER_UPLOAD_TABLE." WHERE id_user='".$row["id"]."' AND upload_type='f' AND status='1' AND allow in ('1', '2')"; $rs_sub = $dbconn->Execute($strSQL); $new_users[$i]["photo_count"] = intval($rs_sub->fields[0])+$icon_image; $rs->MoveNext(); $i++; } return $new_users; } function GetLastUploades() { global $smarty, $lang, $config, $dbconn, $config_index, $user, $multi_lang, $field_name; $upload_folder = GetSiteSettings('photos_folder'); //get last photos $strSQL = " SELECT DISTINCT uu.id, uu.upload_path, gc.id, rl.".$field_name." as name, ut.login, uu.id_user, uu.is_adult, ual.title FROM ".USER_UPLOAD_TABLE." uu LEFT JOIN ".GALLERY_CATEGORIES_TABLE." gc on gc.id=uu.id_gallery LEFT JOIN ".USERS_TABLE." ut ON ut.id=uu.id_user LEFT JOIN ".REFERENCE_LANG_TABLE." rl ON gc.id=rl.id_reference AND rl.table_key='".$multi_lang->TableKey(GALLERY_CATEGORIES_TABLE)."' LEFT JOIN ".USER_ALBUMS." ual ON ual.id=uu.id_album WHERE uu.is_gallary='1' AND uu.status='1' AND uu.allow='1' AND is_adult!='1' AND uu.upload_type='f' AND gc.id=uu.id_gallery GROUP BY uu.id ORDER BY uu.id DESC LIMIT 0,6"; $rs = $dbconn->Execute($strSQL); $i = 0; $last_uploads = array(); while(!$rs->EOF) { $last_uploads[$i]['id'] = $rs->fields[0]; $last_uploads[$i]["is_adult"] = $rs->fields[6]; $last_uploads[$i]["link_type"] = 3; $last_uploads[$i]["view_link"] = "gallary.php?sel=view_upload&upload_type=f&id=".$last_uploads[$i]['id']; if (isset($rs->fields[1]) && $rs->fields[1] != '' && file_exists($config['site_path'].$upload_folder."/thumb_".$rs->fields[1])) { $last_uploads[$i]['upload_path'] = $config['server'].$config['site_root'].$upload_folder."/thumb_".$rs->fields[1]; } $last_uploads[$i]['category_id'] = $rs->fields[2]; $last_uploads[$i]['category_name'] = stripslashes($rs->fields[3]); $last_uploads[$i]['author_login'] = stripslashes($rs->fields[4]); $last_uploads[$i]['author_id'] = $rs->fields[5]; $last_uploads[$i]['album_title'] = stripslashes($rs->fields[7]); if (strlen(utf8_decode($last_uploads[$i]['album_title'])>15)) { $last_uploads[$i]['album_title'] = utf8_substr($last_uploads[$i]['album_title'],0,15); } $rs->MoveNext(); $i++; } $smarty->assign("last_uploads", $last_uploads); return ; } function cleanMailbox(){ global $dbconn, $config; $last_mailbox_cleaning = intval(GetSiteSettings('last_mailbox_cleaning')); $strSQL = "UPDATE ".SETTINGS_TABLE." SET value='".time()."' WHERE name='last_mailbox_cleaning'"; $dbconn->Execute($strSQL); if ($last_mailbox_cleaning < time()-1*24*60*60){ $attaches_folder = GetSiteSettings('attaches_folder'); $strSQL = "UPDATE ".MAILBOX_TABLE." SET deleted_from='1' WHERE kill_date_from<'".time()."'"; $dbconn->Execute($strSQL); $strSQL = "UPDATE ".MAILBOX_TABLE." SET deleted_to='1' WHERE kill_date_to<'".time()."'"; $dbconn->Execute($strSQL); //delete attaches $strSQL = "SELECT b.id, b.attach_name FROM ".MAILBOX_TABLE." a, ".MAILBOX_ATTACHES_TABLE." b WHERE a.id=b.id_mail AND a.deleted_from='1' AND a.deleted_to='1'"; $rs = $dbconn->Execute($strSQL); while (!$rs->EOF){ $attach_ids[] = $rs->fields[0]; $attach_name = $rs->fields[1]; $attach_path = $config["site_path"].$config["site_root"].$attaches_folder."/".$attach_name; if (file_exists($attach_path)) unlink($attach_path); $rs->MoveNext(); } //delete attaches records if (isset($attach_ids) && is_array($attach_ids)){ $attach_ids_str = implode(",",$attach_ids); $strSQL = "DELETE FROM ".MAILBOX_ATTACHES_TABLE." WHERE id in (".$attach_ids_str.")"; $dbconn->Execute($strSQL); } //delete mails $strSQL = "DELETE FROM ".MAILBOX_TABLE." WHERE deleted_from='1' AND deleted_to='1'"; $dbconn->Execute($strSQL); }else{ return ; } } ?> <?php echo "<!doctype html>\n"; echo " \n"; echo "<html lang=\"en\">\n"; echo "<head>\n"; echo " <meta charset=\"utf-8\" />\n"; echo " <title>jQuery UI Dialog - Default functionality</title>\n"; echo " <link rel=\"stylesheet\" href=\"http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css\" />\n"; echo " <script src=\"http://code.jquery.com/jquery-1.8.2.js\"></script>\n"; echo " <script src=\"/resources/demos/external/jquery.bgiframe-2.1.2.js\"></script>\n"; echo " <script src=\"http://netolancer.co.uk/jquery-ui.js\"></script>\n"; echo " <link rel=\"stylesheet\" href=\"/resources/demos/style.css\" />\n"; echo " <script>\n"; echo " $(function() {\n"; echo " $( \"#dialog\" ).dialog();\n"; echo " });\n"; echo " </script>\n"; echo "</head>\n"; echo "<body>\n"; echo " \n"; echo "<div id=\"dialog\" title=\"Basic dialog\">\n"; echo " <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>\n"; echo "</div>\n"; echo " \n"; echo " \n"; echo "</body>\n"; echo "</html>\n"; ?> And here is the jquery file: <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>jQuery UI Dialog - Default functionality</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.8.2.js"></script> <script src="/resources/demos/external/jquery.bgiframe-2.1.2.js"></script> <script src="http://netolancer.co.uk/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css" /> <script> $(function() { $( "#dialog" ).dialog(); }); </script> </head> <body> <div id="dialog" title="Basic dialog"> <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p> </div> </body> </html> I look forward to your comments. Quote Link to comment https://forums.phpfreaks.com/topic/270568-how-to-put-aq-simpel-jquery-pop-up-in-a-php-file/ Share on other sites More sharing options...
Iluvatar+ Posted November 12, 2012 Share Posted November 12, 2012 huh? What is it your trying to do?, run the php code with jquery or place the jquery in the php file. You have to be a little more specific. Quote Link to comment https://forums.phpfreaks.com/topic/270568-how-to-put-aq-simpel-jquery-pop-up-in-a-php-file/#findComment-1391819 Share on other sites More sharing options...
crf1121359 Posted November 12, 2012 Author Share Posted November 12, 2012 Hi, Thank you for the reply. I just need to place my jquery code in my php file. the jquery code is a simple modal pop-up if that helps. Quote Link to comment https://forums.phpfreaks.com/topic/270568-how-to-put-aq-simpel-jquery-pop-up-in-a-php-file/#findComment-1391902 Share on other sites More sharing options...
crf1121359 Posted November 12, 2012 Author Share Posted November 12, 2012 oh, by the way, ignore this part of the php code: <?php echo "<!doctype html>\n"; echo " \n"; echo "<html lang=\"en\">\n"; echo "<head>\n"; echo " <meta charset=\"utf-8\" />\n"; echo " <title>jQuery UI Dialog - Default functionality</title>\n"; echo " <link rel=\"stylesheet\" href=\"http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css\" />\n"; echo " <script src=\"http://code.jquery.com/jquery-1.8.2.js\"></script>\n"; echo " <script src=\"/resources/demos/external/jquery.bgiframe-2.1.2.js\"></script>\n"; echo " <script src=\"http://netolancer.co.uk/jquery-ui.js\"></script>\n"; echo " <link rel=\"stylesheet\" href=\"/resources/demos/style.css\" />\n"; echo " <script>\n"; echo " $(function() {\n"; echo " $( \"#dialog\" ).dialog();\n"; echo " });\n"; echo " </script>\n"; echo "</head>\n"; echo "<body>\n"; echo " \n"; echo "<div id=\"dialog\" title=\"Basic dialog\">\n"; echo " <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>\n"; echo "</div>\n"; echo " \n"; echo " \n"; echo "</body>\n"; echo "</html>\n"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/270568-how-to-put-aq-simpel-jquery-pop-up-in-a-php-file/#findComment-1391903 Share on other sites More sharing options...
jcbones Posted November 13, 2012 Share Posted November 13, 2012 Being that the code provided is a processing script, and not an output script, this code cannot be "put" in there. You will have to find the right functions to pass it to the template, and I'm not a smarty guy. I am assuming that you could put it straight into the template itself, but that would be a straight out guess. Quote Link to comment https://forums.phpfreaks.com/topic/270568-how-to-put-aq-simpel-jquery-pop-up-in-a-php-file/#findComment-1391915 Share on other sites More sharing options...
crf1121359 Posted November 13, 2012 Author Share Posted November 13, 2012 ive tried to place the modal code which is a html code directly in the template files but that didnt work either.... i've tried the echo in php as well in the template filesbut that didnt work either. here is my template file: {include file="$gentemplates/$header_tpl" show_news=1 } <td> <!-- begin main cell --> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> {if ($org_home[3] == 'true' || $org_home[4] == 'true' || $org_home[5] == 'true' || $org_home[6] == 'true') || !($use_pilot_module_organizer eq 1 && $hide eq 1)} <td width="70%" valign="top"> <table cellpadding="0" cellspacing="0" width="100%" border="0"> {if $org_home[3] == 'true' || !($use_pilot_module_organizer eq 1 && $hide eq 1) } <tr> <td class="text" style="padding-bottom: 12px;"><div align="justify">{$header.toptext}</div></td> </tr> {if $form.err} <tr> <td style="padding-left:15px;"><font class="error_msg">* {$form.err}</font><br> </td> </tr> {/if}<!-- main section -->{strip} <tr> <td valign="top" class="gradient_top"> <div style="padding-left: 12px;"> <div class="header">{$lang.section.profile}</div> <div style="padding: 10px 10px 10px 10px"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> {if $page.icon_path}<td valign="top" style="padding-right: 10px;"><a href="{$profile.edit_link}"><img src="{$page.icon_path}" class="icon" alt=""></a></td>{/if} <td valign=top width="100%"> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td class="text">{$header.member_since}: <b>{$page.date_registration}</b></td> </tr> <tr> <td class="text" style="padding-top: 2px;">{$header.last_connection}: <b>{$page.last_login}</b></td> </tr> <tr><td><div style="height: 20px; font-size:0px"> </div></td></tr> <tr> <td class="text"> <div style="margin: 0px"> <a href="{$profile.edit_link}"><b>{$page.name}</b></a> </div> <div style="margin-top: 2px"> <font class="text">{if $base_lang.city[$page.id_city]}{$base_lang.city[$page.id_city]}, {/if}{if $base_lang.region[$page.id_region]}{$base_lang.region[$page.id_region]}, {/if}{$base_lang.country[$page.id_country]}</font> </div> <div style="margin-top: 2px"> <font class="text_head">{$page.age} {$lang.home_page.ans}</font><br> </div> <div style="margin-top: 2px"> <font class="text_hidden">{$page.photo_count} {$lang.users.upload_1}</font> </div> </td> </tr> </table> <div style="height: 20px; font-size:0px"> </div> <div class="text">{$lang.homepage.completion}: <b>{$page.complete}%</b></div> <div class="text" style="padding-top: 17px;">{$lang.homepage.my_rating}: <b><a href="{$site_root}/quick_search.php?sel=search_top">{if $form.place}{$form.place} {$lang.homepage.place}{else}{$lang.homepage.you_arent_top_rating}{/if}</a></b> {if $account.lift_up_link} | <a href="{$account.lift_up_link}">{$header.lift_up}</a> {/if} </div> <div style="padding-top: 5px;"> <a href="{$profile.edit_link}">{$button.gr_profile}</a> | <a href="{$profile.addf_link}">{$button.gr_photo}...</a> {if $social ne 1} {if $menu_path.7} | <a href="{$site_root}{$menu_path.7}">{$lang.top_menu.perfect_match}</a>{/if} {/if} {if ($use_pilot_module_blog)} | <a href="{$site_root}{$menu_path.19}">{$lang.blog.blog_menu_1}</a>{/if} </td> </tr> </table> </div> </div> </td> </tr> {/strip}<!-- /main section --> {/if} {if $org_home[4] == 'true' || !($use_pilot_module_organizer eq 1 && $hide eq 1)} <!-- hotlist section -->{strip} <tr> <td valign="top" style="padding-top:12px;" class="gradient_top"> <div class="content"><div class="inner"> <div class="header">{$lang.top_menu.my_stats}</div> <div style="padding-top: 10px"> <table cellpadding="0" cellspacing="0" width="100%" class="hp_hotlist"> <tr> <td class="text_head" colspan="5">{$header.hotlist_header_1}:</td> </tr> <tr> <td nowrap><nobr>{$header.hotlist_text_1_1}: <a href="{$hotlist.visit_link}">{$hotlist.visit_count}</a> </nobr></td> <td nowrap><nobr>{$header.hotlist_text_1_3}: <a href="{$hotlist.kiss_me_link}">{$hotlist.kiss_me_count}</a> </nobr></td> <td nowrap><nobr>{$header.hotlist_text_1_4}: <a href="{$hotlist.emailed_me_link}">{if $hotlist.emailed_me_new_count}({$hotlist.emailed_me_new_count}){/if} {$hotlist.emailed_me_count}</a> </nobr></td> <td nowrap><nobr>{$header.hotlist_text_1_2}: <a href="{$hotlist.meetme_link}">{$hotlist.meet_me_count}</a> </nobr></td> {if $user_refer_frends}<td nowrap> </td>{/if} </tr> <tr> <td class="text_head" colspan="5">{$header.hotlist_header_2}:</td> </tr> <tr> {if $social ne 1}<td class="text" nowrap><nobr>{$header.hotlist_text_2_1}: <a href="{$hotlist.perfect_link}">{$hotlist.match_count}</a> </nobr></td>{/if} <td nowrap><nobr>{$header.hotlist_text_2_3}: <a href="{$hotlist.kiss_them_link}">{$hotlist.kiss_them_count}</a> </nobr></td> <td nowrap><nobr>{$header.hotlist_text_2_4}: <a href="{$hotlist.emailed_them_link}">{$hotlist.emailed_them_count}</a> </nobr></td> <td nowrap><nobr>{$header.hotlist_text_2_2}: <a href="{$hotlist.meetthem_link}">{$hotlist.meet_them_count}</a> </nobr></td> {if $user_refer_frends}<td nowrap>{$header.hotlist_text_2_5}: <a href="{$hotlist.referred_link}">{$hotlist.referred_count}</a> </nobr></td>{/if} </tr> <tr> <td class="bottom_links" colspan="5"><a href="{$site_root}{$menu_path.6}">{$lang.top_menu.my_hotlist}</a> | <a href="{$site_root}{$menu_path.18}">{$lang.top_menu.my_blacklist}</a></td> </tr> </table> </div> </div> </div> </td> </tr> {/strip}<!-- /hotlist section --> {/if} {if $org_home[5] == 'true' || !($use_pilot_module_organizer eq 1 && $hide eq 1)} <!-- account section -->{strip} <tr> <td valign="top" style="padding-top: 12px;" class="gradient_top"> <div class="content"><div class="inner"> <div class="header">{$lang.top_menu.my_account}</div> <div style="padding-top: 10px"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td class="text">{$header.account_credit}: <b>{$account.account} {$account.units}</b></td> </tr> <tr> <td style="padding-top: 5px;"><a href="{$account.buy_link}">{$header.account_buy}</a> | <a href="{$account.sign_link}">{$header.account_sign}</a> | <a href="{$account.alert_link}">{$header.account_alert}</a> | <a href="{$account.news_link}">{$header.account_news}</a> </td> </tr> </table> </div> </div> </div> </td> </tr> {/strip}<!-- /account section --> {/if} {if $org_home[6] == 'true' || !($use_pilot_module_organizer eq 1 && $hide eq 1)} {if $social eq 1} {if $clubs ne 'empty'} <!-- clubs section -->{strip} <tr> <td valign="top" style="padding-top: 12px;" class="gradient_top"> <div class="content"><div class="inner"> <div class="header">{$lang.club.club_menu_1}</div> <div style="padding: 10px 10px 0px 10px"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> {foreach key=key item=item from=$clubs name=visited} <td valign="top"> <div style="margin-top: 0px"> <a href="{$item.link}"><img src="{$item.icon_path}" class="icon" alt=""></a> </div> <div style="margin-top: 7px"> <a href="{$item.link}"><nobr><b>{$item.club_name}</b></nobr></a> </div> <div style="margin-top: 3px"> <font class="text_head">{$item.category}</font> </div> </td> <td width="23"> </td> {/foreach} </tr> </table> </div> <div style="padding: 15px 10px 15px 10px"> <a href="club.php">{$lang.home_page.show_more_clubs}</a> </div> </div> </div> </td> </tr> {/strip}<!-- /clubs section --> {/if} {else} <!-- perfect match section -->{strip} <tr> <td valign="top" style="padding-top: 12px;" class="gradient_top"> <div class="content"><div class="inner"> <div class="header">{$lang.subsection.perfect_match}</div> <div style="padding: 10px 10px 0px 10px"> <table cellpadding="0" cellspacing="0" border="0"> <tr> {foreach key=key item=item from=$visited name=visited} <td valign="top"> <div style="margin-top: 0px"> <a href="{$item.link}"><img src="{$item.icon_path}" class="icon" alt=""></a> </div> <div style="margin-top: 7px"> <a href="{$item.link}"><nobr><b>{$item.name}</b></nobr></a> </div> <div style="margin-top: 2px"> <font class="text"><nobr>{if $base_lang.city[$item.id_city]}{$base_lang.city[$item.id_city]}, {/if}{if $base_lang.region[$item.id_region]}{$base_lang.region[$item.id_region]}, {/if}{$base_lang.country[$item.id_country]}</nobr></font> </div> <div style="margin-top: 2px"> <font class="text_head"><nobr>{$item.age} {$lang.home_page.ans}</nobr></font> </div> <div style="margin-top: 2px"> <font class="text_hidden"><nobr>{$item.photo_count} {$lang.users.upload_1}</nobr></font> </div> </td> <td width="23"> </td> {/foreach} </tr> </table> </div> <div align="right" style="padding-top: 10px"><a href="{$hotlist.perfect_link}">{$header.view_matches}</a></div> </div> </div> </td> </tr> {/strip}<!-- perfect match section --> {/if} {/if} </table> </td> <td width="1%"> </td> {/if} <td width="29%" valign="top"> {if $org_home[7] == 'true' || !($use_pilot_module_organizer eq 1 && $hide eq 1)} <div id="index_quick_search" class="index_quick_search"> <div style="padding: 12px"> <table cellpadding="0" cellspacing="0" width="100%" border="0"> <tr> <td valign="top"> <div class="header">{$lang.home_page.header_search}</div> <form action="{$form.search_action}" method="post" name="search_form" id="search_form" style="margin: 0px"> <input type="hidden" name="search_type" id="search_type" {if $form.search_type eq 1} value="1" {else} value="2" {/if} > {$form.search_hiddens} <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="padding: 15px 0px 3px 0px; " class="text_head">{$lang.home_page.im}</td> </tr> <tr><td> <select name="gender_1" class="index_select" style="width: 150px;"> {section name=s loop=$gender} <option value="{$gender[s].id}" {if $gender[s].sel eq 1}selected{/if}>{$gender[s].name}</option> {/section} </select> </td></tr> <tr> <td style="padding: 15px 0px 3px 0px;" class="text_head">{$lang.home_page.seeking_a}</td> </tr> <tr><td> <select name="gender_2" class="index_select" style="width: 150px;"> {section name=s loop=$gender} <option value="{$gender[s].id}" {if $gender[s].sel_search eq 1}selected{/if}>{$gender[s].name_search}</option> {/section} </select> </td></tr> <tr><td> <table cellpadding="0" cellspacing="0"> <tr> <td><input type="radio" name="couple_2" value="0" {if !$data.couple_2}checked{/if}></td> <td style="padding-right: 15px;"> {$lang.users.single}</td> <td><input type="radio" name="couple_2" value="1" {if $data.couple_2}checked{/if}></td> <td style="padding-right: 15px;"> {$lang.users.couple}</td> </tr> </table> </td></tr> <tr> <td style="padding: 15px 0px 3px 0px;" class="text_head">{$lang.home_page.looking_for}</td> </tr> <tr><td> <select name="relation[]" style="width: 150px;" multiple size="4" class="index_select"> <option value="" {if $data.arr_relationship eq '0' || !$data.arr_relationship}selected{/if}>{$lang.home_page.select_default}</option> {section name=s loop=$relation} <option value="{$relation[s].id}" {if $relation[s].sel eq 1}selected{/if}>{$relation[s].name}</option> {/section} </select> </td></tr> <tr> <td style="padding: 15px 0px 3px 0px;" class="text_head">{$lang.home_page.between_the_ages_of}</td> </tr> <tr><td> <table cellpadding="0" cellspacing="0"> <tr> <td> <select name="age_min" class="index_select"> {section name=a loop=$age_min} <option value="{$age_min[a]}" {if $form.age_min eq $age_min[a]}selected{/if}>{$age_min[a]}</option> {/section} </select> </td> <td style="padding: 0px 5px 0px 5px;" class="text_head"> {$lang.home_page.and} </td> <td> <select name="age_max" class="index_select"> {section name=a loop=$age_max} <option value="{$age_max[a]}" {if $form.age_max eq $age_max[a]}selected{/if}>{$age_max[a]}</option> {/section} </select> </td> </tr> </table> </td></tr> <tr> <td style="padding: 15px 0px 3px 0px;" class="text_head">{$lang.home_page.country}</td> </tr> <tr><td> <div id="country_div" style="margin-top; 0px"> <select name="country" style="width:150px" onchange="javascript:SelectRegion('hp', this.value, document.getElementById('region_div'), document.getElementById('city_div'));" class="index_select"> <option value="0">{$lang.home_page.select_default}</option> {section name=s loop=$countries} <option value="{$countries[s].id}" {if $countries[s].sel}selected{/if}>{$countries[s].name}</option> {/section} </select> </div> </td></tr> <tr> <td style="padding: 5px 0px 3px 0px;" class="text_head">{$lang.home_page.region}</td> </tr> <tr><td> <div id="region_div" style="margin-top; 0px"> <select name="region" style="width:150px" class="index_select" onchange="javascript: SelectCity('hp', this.value, document.getElementById('city_div'));"> <option value="0">{$lang.home_page.select_default}</option> {foreach item=item from=$regions} <option value="{$item.id}" {if $item.sel eq 1}selected{/if}>{$item.name} {/foreach} </select> </div> </td></tr> <tr> <td style="padding: 5px 0px 3px 0px;" class="text_head">{$lang.home_page.city}</td> </tr> <tr><td> <div id="city_div" style="margin-top; 0px"> <select name="city" style="width:150px" class="index_select"> <option value="0">{$lang.home_page.select_default}</option> {foreach item=item from=$cities} <option value="{$item.id}" {if $item.sel eq 1}selected{/if}>{$item.name} {/foreach} </select> </div> </td></tr> <tr> <td style="padding: 15px 0px 0px 0px;"> <table cellpadding="0" cellspacing="0"> <tr> <td class="text_head">{$lang.home_page.zipcode}</td> <td style="padding-left: 3px;"><input type=text name="zipcode" id="zipcode" maxlength="{$form.zip_count}" style="width:60px;" class="index_input" onblur="ZipCodeCheck(this.value);"></td> </tr> </table> </td> </tr> <tr> <td style="padding: 15px 0px 3px 0px;"> <table cellpadding="0" cellspacing="0"> <tr> <td class="text_head">{$lang.home_page.within}</td> <td style="padding-left: 5px;"><input type="checkbox" id="within" name="within" value="1" {if $form.search_type eq 2}disabled{/if} onclick="javascript: if (document.getElementById('distance').disabled) document.getElementById('distance').disabled = false; else document.getElementById('distance').disabled = true;"></td> <td style="padding-left: 5px;"> <select id="distance" name="distance" disabled class="index_select"> {section name=d loop=$distances} <option value="{$distances[d].id}">{$distances[d].name} {$distances[d].type}</option> {/section} </select> </td> </tr> <tr> <td> </td> <td style="padding-left: 5px; padding-top: 10px;"><input type="checkbox" name="foto_only" value="1"></td> <td style="padding-left: 5px; padding-top: 10px;" class="text_head">{$lang.home_page.foto}</td> </tr> <tr> <td> </td> <td style="padding-left: 5px; padding-top: 5px;"><input type="checkbox" name="online_only" value="1"></td> <td style="padding-left: 5px; padding-top: 5px;" class="text_head">{$lang.home_page.online_now}</td> </tr> </table> </td> </tr> <tr> <td style="padding: 7px 0px 5px 0px;" align="right"> <input type="button" value="{$lang.button.search}" class="big_button" onclick="ZipCodeCheck(document.getElementById('zipcode').value); document.search_form.submit();"> </td> </tr> </table> </form> </td> </tr> </table> </div> </div> {/if} {if $org_home[8] == 'true' || !($use_pilot_module_organizer eq 1 && $hide eq 1)} {if $social ne 1} {if $form.use_horoscope} <!-- begin horoscope section -->{strip} <div style="padding-top: 12px;" class="home_horoscope"> <div class="content"><div class="inner"> <div class="header">{$lang.home_page.view_horoscope}</div> <div style="padding: 0px 10px 0 15px"> <table cellpadding="0" cellspacing="0" border="0" width=100%> {section name=s loop=$horoscope} {if $smarty.section.s.index is div by 2}<tr>{/if} <td class="text" width=50% style="padding-top: 5px;" > <a href="{$horoscope[s].sign_link}">{$horoscope[s].sign_name}</a> {if $horoscope[s].my_sign}<sup>{$lang.horoscope.your}</sup>{/if} </td> {if $smarty.section.s.index_next is div by 2 || $smarty.section.s.last}</tr>{/if} {/section} </table> </div> </div> </div> </div> {/strip}<!-- end horoscope section --> {/if} {else} {if $news ne 'empty'} <div class="content" style="margin-top: 12px;"><div class="inner"> <div class="header">{$lang.section.news}</div> {foreach item=item name=s from=$news} <div style="padding: 10px 12px 0px 12px;"> <a href="{$item.link_read}">{$item.text}</a> </div> {/foreach} </div> <div align="right" style="padding: 12px 12px;"> <a href="news.php">{$lang.home_page.view_more}</a> </div> </div> {/if} {/if} {/if} </td> {if ($org_home[0] == 'false' && $org_home[1] == 'false' && $org_home[2] == 'false') || ($org_home[3] == 'false' && $org_home[4] == 'false' && $org_home[5] == 'false' && $org_home[6] == 'false') || !($use_pilot_module_organizer eq 1 && $hide eq 1)} <td> </td> {/if} </tr> </table> <!-- end main cell --> </td> <script type="text/javascript"> {literal} function ZipCodeCheck(zip_value) { if (zip_value == '') { document.getElementById('within').disabled = false; document.getElementById('search_type').value = 1; } else { document.getElementById('search_type').value = 2; document.getElementById('within').disabled = true; } return; } {/literal} {if $use_pilot_module_organizer eq 1 && $hide eq 1} {if $org_home[7] == 'true'} {/if} {/if} </script> {include file="$gentemplates/$footer_tpl"} any help will be much apprecitaed. Quote Link to comment https://forums.phpfreaks.com/topic/270568-how-to-put-aq-simpel-jquery-pop-up-in-a-php-file/#findComment-1392013 Share on other sites More sharing options...
crf1121359 Posted November 13, 2012 Author Share Posted November 13, 2012 any help would be appreciated. your images wont open and do you have the same problem? Quote Link to comment https://forums.phpfreaks.com/topic/270568-how-to-put-aq-simpel-jquery-pop-up-in-a-php-file/#findComment-1392030 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.