-1 || strpos($awm_name,".js")>-1 ) { $awm_nm = explode("/", $awm_name); $awm_name = $awm_nm[1]; $awm_nm = explode(".", $awm_name); $awm_name = $awm_nm[0]; } return $awm_name; } /* This code checks for updated versions of the AllWebMenus software and informs the user if necessary */ function AWM_check() { global $awm_url, $awm_total_tabs; $awm_the_msg = array(); $awm_realpath = dirname(__FILE__) .'/../../..'. get_option('AWM_menu_path'); $awm_path = get_bloginfo('url') . get_option('AWM_menu_path'); error_reporting(0); for ($awm_t=0; $awm_t<$awm_total_tabs; $awm_t++) { $awm_the_msg[$awm_t] = ""; if (!get_option('AWM_menu_active_'.$awm_t)) continue; $awm_name = trim(get_option('AWM_menu_name_'.$awm_t)).".js"; if (! ($awm_menufile = fopen($awm_realpath . $awm_name, 'r'))) { $awm_the_msg[$awm_t] = "Menu ".get_option('AWM_menu_name_'.$awm_t)." was not found at: ". $awm_path . $awm_name; continue; } elseif (! ($awm_mfile = fread($awm_menufile, filesize($awm_realpath . $awm_name)))) { $awm_the_msg[$awm_t] = "Could not read menu at: ". $awm_path . $awm_name; continue; } $awm_bNo = explode('awmLibraryBuild=', $awm_mfile); if ($awm_bNo[1]==null) { $awm_the_msg[$awm_t] = "Could not read menu at: ". $awm_path . $awm_name; continue; } $awm_bNo = explode(';', $awm_bNo[1]); $awm_buildNo = $awm_bNo[0]; $awm_hNo = explode('awmHash=\'', $awm_mfile); if ($awm_hNo[1]==null) { $awm_the_msg[$awm_t] = "Could not read menu at: ". $awm_path . $awm_name; continue; } $awm_hNo = explode('\'', $awm_hNo[1]); $awm_HashNo = $awm_hNo[0]; $awm_params = "plugin=wordpress&build=$awm_buildNo&hash=$awm_HashNo&rand=". rand(1,10000) ."&domain=". get_bloginfo('url'); if (function_exists('curl_init')) { if (! ($awm_tmp = geturl($awm_params))) { $awm_the_msg[$awm_t] = "Could not retrieve version information for ".get_option('AWM_menu_name_'.$awm_t).". Please contact Likno for more information."; } else { $awm_the_msg[$awm_t] = $awm_tmp; } continue; } else { $awm_the_msg[$awm_t] = ''; } } $awm_has_msg = false; for ($awm_t=0; $awm_t<$awm_total_tabs; $awm_t++) { if ($awm_the_msg[$awm_t] != "") $awm_has_msg = true; break; } $awm_the_full_msg = ""; if ($awm_has_msg) { $awm_the_full_msg = "