isMobile() ) { $_SESSION['mobile_detect']="mobile"; if ( $detect->isTablet() ) { $_SESSION['mobile_detect_tablet']="tablet"; if ( stristr($_SERVER['HTTP_USER_AGENT'],"iPad") ) { $_SESSION['mobile_detect_ipad']="iPad"; } else { $_SESSION['mobile_detect_ipad']="not iPad"; } } else { $_SESSION['mobile_detect_tablet']="not tablet"; $_SESSION['mobile_detect_ipad']="not iPad"; } } else { $_SESSION['mobile_detect']="desktop"; $_SESSION['mobile_detect_tablet']="not tablet"; $_SESSION['mobile_detect_ipad']="not iPad"; } } // Search Engine: yes or no.... // Is this a search engine? $search_engine_strings=array( "A6-Indexer", "admantx", "AdsBot-Google", "AhrefsBot", "AndersPinkBot", "APIs-Google", "Applebot", "AppEngine-Google", "archive.org", "baidu.com", "bingbot", "BingPreview", "Buzzbot", "Clickagy Intelligence Bot", "Crawler", "crawler4j", "DotBot", "Dataprovider", "Digg Deeper", "EveryoneSocialBot", "Ezooms", "facebookexternalhit", "FlipboardProxy", "Grapeshot", "Go-http-client", "Googlebot", "Google-AMPHTML", "Google-HTTP-Java-Client/1.17.0-rc", "HybridBot", "InAGist", "integralads", "ips-agent", "kraken/0.6.0", "Leikibot", "link_thumbnailer", "linkdexbot", "linkfluence", "LivelapBot", "MJ12bot", "Mediapartners-Google", "Mediatoolkitbot", "MetaURI", "msnbot", "NetSeer", "OpenLinkProfiler", "panscient.com", "PaperLiBot", "Pinterest", "Plukkie", "proximic", "Semanticbot", "SemrushBot", "SiteExplorer", "Slurp", "SkypeUriPreview", "SMUrlExpander", "SNAPSHOT", "SocialRankIO", "spider", "support.embed.ly", "TipTop", "tweetedtimes", "TweetmemeBot", "Twitterbot", "ubermetrics-technologies", "Upflow", "warebay", "wotbox", "wpif", "Yahoo", "YandexBot" ); $search_engine="no"; foreach ($search_engine_strings as $test_string) { if ( stristr($_SERVER['HTTP_USER_AGENT'],$test_string) ) { $search_engine="yes"; } } // Let's look at Class C IP matches: $class_c_strings=array( "23.96.", //Microsoft "34.192.", // AMAZON "34.193.", // AMAZON "34.194.", // AMAZON "34.195.", // AMAZON "34.196.", // AMAZON "35.156.", // AMAZON "35.157.", // AMAZON "35.158.", // AMAZON "35.159.", // AMAZON "35.160.", // AMAZON "35.161.", // AMAZON "35.162.", // AMAZON "35.163.", // AMAZON "35.164.", // AMAZON "35.165.", // AMAZON "35.166.", // AMAZON "35.167.", // AMAZON "50.16.", // AMAZON "50.17.", // AMAZON "50.19.", // AMAZON "50.112.", // AMAZON "52.0.", // AMAZON "52.1.", // AMAZON "52.2.", // AMAZON "52.3.", // AMAZON "52.4.", // AMAZON "52.5.", // AMAZON "52.6.", // AMAZON "52.7.", // AMAZON "52.8.", // AMAZON "52.9.", // AMAZON "52.10.", // AMAZON "52.11.", // AMAZON "52.12.", // AMAZON "52.13.", // AMAZON "52.15.", // AMAZON "52.16.", // AMAZON "52.17.", // AMAZON "52.18.", // AMAZON "52.19.", // AMAZON "52.20.", // AMAZON "52.21.", // AMAZON "52.22.", // AMAZON "52.23.", // AMAZON "52.24.", // AMAZON "52.25.", // AMAZON "52.26.", // AMAZON "52.27.", // AMAZON "52.28.", // AMAZON "52.29.", // AMAZON "52.30.", // AMAZON "52.31.", // AMAZON "52.32.", // AMAZON "52.33.", // AMAZON "52.34.", // AMAZON "52.35.", // AMAZON "52.36.", // AMAZON "52.37.", // AMAZON "52.38.", // AMAZON "52.39.", // AMAZON "52.44.", // AMAZON "52.45.", // AMAZON "52.48.", // AMAZON "52.49.", // AMAZON "52.50.", // AMAZON "52.51.", // AMAZON "52.52.", // AMAZON "52.53.", // AMAZON "52.54.", // AMAZON "52.55.", // AMAZON "52.70.", // AMAZON "52.71.", // AMAZON "52.72.", // AMAZON "52.73.", // AMAZON "52.86.", // AMAZON "52.87.", // AMAZON "52.90.", // AMAZON "52.91.", // AMAZON "52.200.", // AMAZON "52.201.", // AMAZON "52.202.", // AMAZON "52.203.", // AMAZON "52.204.", // AMAZON "52.205.", // AMAZON "52.206.", // AMAZON "52.207.", // AMAZON "52.208.", // AMAZON "52.209.", // AMAZON "52.210.", // AMAZON "52.211.", // AMAZON "52.212.", // AMAZON "52.213.", // AMAZON "52.214.", // AMAZON "52.215.", // AMAZON "52.216.", // AMAZON "54.64.", // AMAZON "54.65.", // AMAZON "54.66.", // AMAZON "54.67.", // AMAZON "54.68.", // AMAZON "54.69.", // AMAZON "54.70.", // AMAZON "54.71.", // AMAZON "54.72.", // AMAZON "54.73.", // AMAZON "54.74.", // AMAZON "54.75.", // AMAZON "54.76.", // AMAZON "54.77.", // AMAZON "54.78.", // AMAZON "54.79.", // AMAZON "54.80.", // AMAZON "54.81.", // AMAZON "54.82.", // AMAZON "54.83.", // AMAZON "54.84.", // AMAZON "54.85.", // AMAZON "54.86.", // AMAZON "54.87.", // AMAZON "54.88.", // AMAZON "54.89.", // AMAZON "54.90.", // AMAZON "54.91.", // AMAZON "54.92.", // AMAZON "54.144.", // AMAZON "54.145.", // AMAZON "54.146.", // AMAZON "54.147.", // AMAZON "54.148.", // AMAZON "54.149.", // AMAZON "54.150.", // AMAZON "54.151.", // AMAZON "54.152.", // AMAZON "54.153.", // AMAZON "54.154.", // AMAZON "54.155.", // AMAZON "54.156.", // AMAZON "54.157.", // AMAZON "54.158.", // AMAZON "54.159.", // AMAZON "54.160.", // AMAZON "54.161.", // AMAZON "54.162.", // AMAZON "54.163.", // AMAZON "54.164.", // AMAZON "54.165.", // AMAZON "54.166.", // AMAZON "54.167.", // AMAZON "54.168.", // AMAZON "54.169.", // AMAZON "54.170.", // AMAZON "54.171.", // AMAZON "54.172.", // AMAZON "54.173.", // AMAZON "54.174.", // AMAZON "54.175.", // AMAZON "54.176.", // AMAZON "54.177.", // AMAZON "54.183.", // AMAZON "54.184.", // AMAZON "54.185.", // AMAZON "54.186.", // AMAZON "54.187.", // AMAZON "54.188.", // AMAZON "54.189.", // AMAZON "54.190.", // AMAZON "54.191.", // AMAZON "54.193.", // AMAZON "54.194.", // AMAZON "54.195.", // AMAZON "54.196.", // AMAZON "54.197.", // AMAZON "54.198.", // AMAZON "54.199.", // AMAZON "54.200.", // AMAZON "54.201.", // AMAZON "54.202.", // AMAZON "54.203.", // AMAZON "54.204.", // AMAZON "54.205.", // AMAZON "54.206.", // AMAZON "54.207.", // AMAZON "54.208.", // AMAZON "54.209.", // AMAZON "54.210.", // AMAZON "54.211.", // AMAZON "54.212.", // AMAZON "54.213.", // AMAZON "54.214.", // AMAZON "54.215.", // AMAZON "54.216.", // AMAZON "54.217.", // AMAZON "54.218.", // AMAZON "54.219.", // AMAZON "54.220.", // AMAZON "54.221.", // AMAZON "54.222.", // AMAZON "54.224.", // AMAZON "54.225.", // AMAZON "54.226.", // AMAZON "54.227.", // AMAZON "54.234.", // AMAZON "54.235.", // AMAZON "54.236.", // AMAZON "54.237.", // AMAZON "54.242.", // AMAZON "54.243.", // AMAZON "66.102.", // Google "66.220.145.", // Facebook "66.249.64.", // Google "66.249.65.", // Google "66.249.66.", // Google "66.249.67.", // Google "66.249.68.", // Google "66.249.69.", // Google "66.249.70.", // Google "66.249.71.", // Google "66.249.72.", // Google "66.249.73.", // Google "66.249.74.", // Google "66.249.75.", // Google "66.249.76.", // Google "66.249.77.", // Google "66.249.78.", // Google "66.249.79.", // Google "66.249.80.", // Google "66.249.81.", // Google "66.249.82.", // Google "66.249.83.", // Google "66.249.84.", // Google "66.249.85.", // Google "66.249.86.", // Google "66.249.87.", // Google "66.249.88.", // Google "66.249.89.", // Google "66.249.90.", // Google "66.249.91.", // Google "66.249.92.", // Google "66.249.93.", // Google "66.249.94.", // Google "66.249.95.", // Google "75.101.247.", // AMAZON "104.154.", // Google "104.155.", // Google "107.20.", // AMAZON "107.21.", // AMAZON "107.22.", // AMAZON "107.23.", // AMAZON "136.243.47.", // CRONYCLE.COM "144.76.14.", // TRENDICTION "144.76.22.", // TRENDICTION "144.76.23.", // TRENDICTION "144.76.163.", // TRENDICTION "150.70.188.", // Tokyo Spider "150.70.173.", // Tokyo Spider "184.72.", // AMAZON "184.73.", // AMAZON "199.59.148." // Twitter ); foreach ($class_c_strings as $test_class_c) { if ( substr($_SERVER['REMOTE_ADDR'], 0, strlen($test_class_c)) == $test_class_c ) { $search_engine="yes"; } } // Now lets look at specific IP address: $ip_strings=array( "54.83.105.164", "62.210.181.15", // French spider - LYON - UA: "Mozilla/5.0" "66.119.41.10", // Savvis - Colo provider. "97.107.132.61", // Linode hosted spider - Cedar Knolls NJ "138.201.205.93", "138.201.202.219", "144.76.94.112", "148.251.246.203", // TAME.IT "149.56.19.59", // Croma.io "149.56.19.222", // Croma.io "188.166.209.192", // crawler1.gnews.io "209.85.238.18" // Google ); foreach ($ip_strings as $test_ip) { if ( stristr($_SERVER['REMOTE_ADDR'],$test_ip) ) { $search_engine="yes"; } } // Turn off Search Engine detection: //$search_engine="no"; // Make sure this is a unique browser request: if ( $_SESSION['last_page'] == $_SERVER['PHP_SELF'] ) { $bad_session="true"; } else { $bad_session="false"; $_SESSION['last_page']=$_SERVER['PHP_SELF']; // track session impressions: if ( $_SESSION['impressions'] == "" ) { $_SESSION['impressions']=1; } else { $_SESSION['impressions']++; } } if ( $bad_session == "false" ) { // is there earn_data?: if ( $_SESSION['earn_exists'] == "" ) { // there is no earn_data at the session level, so check to see if it's in a cookie: if ( isset($_COOKIE['earn_data']['exists'])) { // there is earn_data, so load it into SESSION array $_SESSION['earn_data']=$_COOKIE['earn_data']; } else { // no cookie or session data, so initialize SESSION array $_SESSION['earn_data']['exists'] = "true"; } } // otherwise there is session level earn_data, so we'll work with that... // Pack the earn_data into a text array: $earn_data_text_array=http_build_query($_SESSION['earn_data'], 'flags_'); // Get the ad code: $bright_url = "https://www.brightsrv.com/internet4classrooms.com/ssas_xml.php?path=common_core/ccss_assessment_tasks_htm&ip_address=".$_SERVER['REMOTE_ADDR']."&impr=".$_SESSION['impressions']."&mobile_detect=".$_SESSION['mobile_detect']."&search_engine=".$search_engine."&".$earn_data_text_array; $bright_curl_fetch = curl_init($bright_url); curl_setopt($bright_curl_fetch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($bright_curl_fetch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($bright_curl_fetch, CURLOPT_TIMEOUT, 6); $raw_tags = curl_exec($bright_curl_fetch); if ( $raw_tags == NULL ) { // Default ad code: $ldr_tag=" \n" ; $rect_tag=" \n" ; $sky_tag=" \n" ; $vb_tag=" \n" ; $earn_data_returned=""; $message="BRIGHT URL: ".$bright_url." DATE: ".date("r")." "; } else { $xml_tags = new SimpleXMLElement($raw_tags); $ldr_tag=base64_decode($xml_tags->tag_set[0]->leaderboard); $rect_tag=base64_decode($xml_tags->tag_set[0]->rectangle); $sky_tag=base64_decode($xml_tags->tag_set[0]->skyscraper); $vb_tag=base64_decode($xml_tags->tag_set[0]->{'vertical-banner'}); $earn_data_returned=base64_decode($xml_tags->tag_set[0]->{'earn_data_returned'}); } curl_close($bright_curl_fetch); $_SESSION['g_ldr_tag']=$ldr_tag; $_SESSION['g_rect_tag']=$rect_tag; $_SESSION['g_sky_tag']=$sky_tag; $_SESSION['g_vb_tag']=$vb_tag; // unpack the earn_data_returned into a session array and also set the cookies $earn_data_elements=explode(";",$earn_data_returned); foreach ($earn_data_elements as $var_pair) { $var_array=explode("=",$var_pair); $_SESSION['earn_data'][$var_array[0]]=$var_array[1]; } $cookie_return=setcookie("earn_data",$_SESSION['earn_data'], time()+7*3600*24,"/"); } else { $ldr_tag=$_SESSION['g_ldr_tag']; $rect_tag=$_SESSION['g_rect_tag']; $sky_tag=$_SESSION['g_sky_tag']; $vb_tag=$_SESSION['g_vb_tag']; } // are we on a page that needs redirects? $this_file=basename($_SERVER['SCRIPT_NAME']); $redir_data = mysqli_query($mysqli_con,"SELECT new FROM popup_redir_help WHERE old='".$this_file."' "); if ( $search_engine == "no" && $redir=mysqli_fetch_array($redir_data) ) { $need_redirect="true"; } else if (isset($_SESSION['visitor_id'])) { // This is not new session.... if (isset($_COOKIE['visitor_id'])) { // they accept cookies $nothing=0; } else { // this ip/visitor does not accept cookies... $_SESSION['visitor_id']=0; } } else { // This is new session // IP value: $ip_address=$_SERVER['REMOTE_ADDR']; // Example PHP Function To Convert IP Address to IP Number function Dot2LongIP ($IPaddr) { if ($IPaddr == "") { return 0; } else { $ips = explode ("\.", "$IPaddr"); return ($ips[3] + $ips[2] * 256 + $ips[1] * 256 * 256 + $ips[0] * 256 * 256 * 256); } } $ip_number=Dot2LongIP($ip_address); $check_geo_query="SELECT * ". "FROM ip_region_city ". "WHERE ip_to >= ".$ip_number." AND ip_from <= ".$ip_number." limit 1 "; /* Get the geo data: */ $check_geo_data = mysqli_query($mysqli_con,$check_geo_query); $check_geo = mysqli_fetch_array($check_geo_data); // But are they a returning visitor? if (isset($_COOKIE['visitor_id'])) { // This is a returning visitor // set the Session visitor id to match the cookie visitor id $_SESSION['visitor_id']=$_COOKIE['visitor_id']; // What do we know about this visitor (check database): $check_visitor_query="SELECT * from visitor WHERE visitor_id = '".$_SESSION['visitor_id']."' "; $check_visitor_data = mysqli_query($mysqli_con,$check_visitor_query); if (mysqli_num_rows($check_visitor_data) > 0) { $check_visitor = mysqli_fetch_array($check_visitor_data); $_SESSION['member_datestamp']=$check_visitor['member_datestamp']; $_SESSION['type']=$check_visitor['type']; $_SESSION['email']=$check_visitor['email']; $_SESSION['firstname']=$check_visitor['firstname']; $_SESSION['lastname']=$check_visitor['lastname']; $_SESSION['country']=$check_visitor['country']; $_SESSION['region']=$check_visitor['region']; $_SESSION['city']=$check_visitor['city']; // Are they a parent or teacher and not a subscriber and last ask > 7 days ago? if ( $_SESSION['member_datestamp'] == '0000-00-00 00:00:00' && !isset($_COOKIE['visitor_popup']) ) { if ( $_SESSION['type'] == "" ) { $ask_popup="type and subscribe"; // set visitor popup cookie for 7 days: $cookie_return=setcookie("visitor_popup",$_SESSION['visitor_id'], time()+7*3600*24,"/"); } elseif ( $_SESSION['type'] != "elementary" && $_SESSION['type'] != "middle" && $_SESSION['type'] != "high" && $_SESSION['email'] == "" ) { $ask_popup="subscribe only"; // set visitor popup cookie for 7 days: $cookie_return=setcookie("visitor_popup",$_SESSION['visitor_id'], time()+7*3600*24,"/"); } } } else { // Have cookie'd visitor_id but that record is gone... // Create a new visitor record: $create_visitor_record_query="replace into visitor ( ". "visitor_id, initial_datestamp,last_datestamp, ". "country,region,". "city) values (". "'".$_SESSION['visitor_id']."', '".date("Y-m-d H:i:s")."','".date("Y-m-d H:i:s")."', ". "'".$check_geo['country_short']."', '".mysqli_real_escape_string($mysqli_con,$check_geo['ip_region']). "', '".mysqli_real_escape_string($mysqli_con,$check_geo['ip_city'])."') "; mysqli_query($mysqli_con,$create_visitor_record_query) or die(mysqli_error($mysqli_con)); $_SESSION['visitor_id']=mysqli_insert_id($mysqli_con); // set Visitor cookie: $cookie_return=setcookie("visitor_id",$_SESSION['visitor_id'], time()+365*3600*24,"/"); // set Visitor session variables: $_SESSION['member_datestamp']='0000-00-00 00:00:00'; $_SESSION['type']=""; $_SESSION['email']=""; $_SESSION['firstname']=""; $_SESSION['lastname']=""; $_SESSION['country']=$check_geo['country_short']; $_SESSION['region']=$check_geo['ip_region']; $_SESSION['city']=$check_geo['ip_city']; // send a diagnostic email.... $message="Cookied Visitor ID but missing from Visitor Table: \n". "Create Member Query: ".$create_visitor_record_query."\n". "Visitor ID: ".$_SESSION['visitor_id']."\n". "Country Code: ".$_SESSION['country']."\n". "Region: ".$_SESSION['region']."\n". "City: ".$_SESSION['city']."\n". "From IP: ".$_SERVER['REMOTE_ADDR']."\n"; mail("bfranklin@internet4classrooms.com","Cookied Visitor ID but missing from Visitor Table",$message); } } else { // They are either a new visitor or don't accept cookies // Create a new visitor record: $create_visitor_record_query="Insert into visitor ( ". "initial_datestamp,last_datestamp, ". "country,region,". "city) values (". "'".date("Y-m-d H:i:s")."','".date("Y-m-d H:i:s")."', ". "'".$check_geo['country_short']."', '".mysqli_real_escape_string($mysqli_con,$check_geo['ip_region']). "', '".mysqli_real_escape_string($mysqli_con,$check_geo['ip_city'])."') "; mysqli_query($mysqli_con,$create_visitor_record_query) or die(mysqli_error($mysqli_con)); $_SESSION['visitor_id']=mysqli_insert_id($mysqli_con); // set Visitor cookie: $cookie_return=setcookie("visitor_id",$_SESSION['visitor_id'], time()+365*3600*24,"/"); // set Visitor session variables: $_SESSION['member_datestamp']='0000-00-00 00:00:00'; $_SESSION['type']=""; $_SESSION['email']=""; $_SESSION['firstname']=""; $_SESSION['lastname']=""; $_SESSION['country']=$check_geo['country_short']; $_SESSION['region']=$check_geo['ip_region']; $_SESSION['city']=$check_geo['ip_city']; } } $insert_visit_info_query="Insert into visits (visitor_id,url,referrer,ip_address,visit_datestamp) ". "VALUES ('".$_SESSION['visitor_id']."', '".$_SERVER['PHP_SELF']."', '".$_SERVER['HTTP_REFERER']."', '".$_SERVER['REMOTE_ADDR']."', '".date("Y-m-d H:i:s")."') "; if ( $bad_session == "false" ) { mysqli_query($mysqli_con,$insert_visit_info_query) or die(mysqli_error($mysqli_con)); } // DONE WITH PRELIMINARY AND COOKIE PROCESSING // Are we creating an account?: if ( isset($_POST['join']) && $_POST['join'] == "Submit" ) { if ( $_SESSION['visitor_id'] == "0" ) { // Create a new visitor record: $create_visitor_record_query="Insert into visitor ( ". "initial_datestamp,last_datestamp, ". "country,region,". "member_datestamp, type, ". "firstname, lastname, ". "email,city) values (". "'".date("Y-m-d H:i:s")."','".date("Y-m-d H:i:s")."', ". "'".$check_geo['country_short']."', '".mysqli_real_escape_string($mysqli_con,$check_geo['ip_region'])."', ". "'".date("Y-m-d H:i:s")."', '".$_POST['type']."', ". "'".$_POST['firstname']."', '".$_POST['lastname']."', ". "'".$_POST['email']."', '".mysqli_real_escape_string($mysqli_con,$check_geo['ip_city'])."') "; mysqli_query($mysqli_con,$create_visitor_record_query) or die(mysqli_error($mysqli_con)); $_SESSION['visitor_id']=mysqli_insert_id($mysqli_con); } else { // Assume data is good... $create_member_query="Update visitor set email='".$_POST['email']."', ". "member_datestamp='".date("Y-m-d H:i:s")."', ". "last_datestamp='".date("Y-m-d H:i:s")."', ". "type='".$_POST['type']."', ". "firstname='".$_POST['firstname']."', ". "lastname='".$_POST['lastname']."' ". "where visitor_id='".$_SESSION['visitor_id']."' "; // Insert the data: mysqli_query($mysqli_con,$create_member_query) or die(mysqli_error($mysqli_con)); } // Update the session variables: $_SESSION['email']=$_POST['email']; $_SESSION['firstname']=$_POST['firstname']; $_SESSION['lastname']=$_POST['lastname']; $_SESSION['member_datestamp']=date("Y-m-d H:i:s"); $_SESSION['type']=$_POST['type']; // send email to admin about new user... $message="New I4C Member: ".$_SESSION['email']."\n". "Create Member Query: ".$create_member_query."\n". "Visitor ID: ".$_SESSION['visitor_id']."\n". "First: ".$_SESSION['firstname']."\n". "Last: ".$_SESSION['lastname']."\n". "Email: ".$_SESSION['email']."\n". "Country Code: ".$_SESSION['country']."\n". "Region: ".$_SESSION['region']."\n". "City: ".$_SESSION['city']."\n". "From IP: ".$_SERVER['REMOTE_ADDR']."\n"; //mail("susan.brooks@internet4classrooms.com","New I4C User",$message); if ( $_SESSION['email'] != "" ) { // Send the new newsletter list member a multi-part mime welcome email: $messageplain = "\n\n". "Internet4Classrooms.com\n". "\n". "Welcome!\n". "\n". "Dear ".$_SESSION['firstname'].",\n". "\n". "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n". "Thank you for subscribing to Internet4Classrooms.com. We are dedicated to providing the best free educational resources on the internet to teachers, parents and students. Your email address and interest preferences have been recorded in our database. In the future, you will receive periodic emails specific to your interests.\n". "\n". "Privacy is important to us; therefore, we will not sell, rent, or give your name or address to anyone. At any point, you can select the link at the bottom of every email to unsubscribe, or to receive less or more information.\n". "\n". "We look forward to hearing from you with any comments or suggestions about our website.\n". "\n". "We are currently redesigning our site to include more information that will be helpful to you and make it easier to use our great content both in the classroom and at home. So stay tuned!\n". "\n". "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n". "\n". "Thanks again for registering. If you have any questions or comments, feel free to contact us.\n". "\n". "Sincerely,\n". "\n". "Susan Brooks\n". "Internet4Classrooms, LLC\n". "\n". "------------------------------------------------------------\n". "email: susan.brooks@internet4classrooms.com\n". "web: https://www.internet4classrooms.com\n". "------------------------------------------------------------\n". "\n". "This email was sent to ".$_SESSION['email']." by susan.brooks@internet4classrooms.com.\n". "\n". "Update Profile/Email Address: Simply reply to this message with \"Change Email\" and your new email address.\n". "\n". "Instant Removal from this list: Simply go here: https://internet4classrooms.com/unsubscribe.php?email=".$_SESSION['email']."&list=newsletter_signup\n". "\n". "Privacy Policy: https://www.internet4classrooms.com/privacy-policy.htm\n". "\n". "Internet4classrooms, LLC | 250 Colegrove Street | Memphis | TN | 38120\n". "\n". "\n". "\n"; $messagehtml = "\n". "\n". "Thank you for joining our mailing list\n". "\n". "\n". "
\n". "\n". "\n". "\n". "\n". "
\n". "\"internet4classrooms\n". "
\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "

\"-\"\n". "\n". "Internet4Classrooms.com\n". "\n". "
\"-\"\"-\"
\n". "\"-\"\n". "
\n". "\n". "\n". "\n". "\n". "\n". "\n". "
\n". "\"-\"\n". "\n". "
\n". "
\n". "    \n". "Welcome!\n". "\n". "    \n". "\n". "
\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "
\n". "\"-\"\n". "\n". "\n". "\n". "\n". "\n". "
\n". "\n". "Dear ".$_SESSION['firstname'].",\n". "
\n". "

\n". "Thank you for subscribing to Internet4Classrooms.com. We are dedicated to providing the best free educational resources on the internet to teachers, parents and students. Your email address and interest preferences have been recorded in our database. In the future, you will receive periodic emails specific to your interests.\n". "

\n". "

Privacy is important to us; therefore, we will not sell, rent, or give your name or address to anyone. At any point, you can select the link at the bottom of every email to unsubscribe, or to receive less or more information.\n". "

\n". "

We look forward to hearing from you with any comments or suggestions about our website.

\n". "

We are currently redesigning our site to include more information that will be helpful to you and make it easier to use our great content both in the classroom and at home. So stay tuned!\n". "

\n". "

\n". "Thanks again for registering. If you have any questions or comments, feel free to contact us.\n". "

\n". "

Sincerely,

\n". "
\n". "Susan Brooks\n". "

Internet4classrooms, LLC\n". "


\n". "email:\n". "susan.brooks@internet4classrooms.com\n". "
\n". "
\n". "
\n". "web:\n". "https://www.internet4classrooms.com\n". "
\n". "
\n". "
\n". "\"-\"\n". "
\"-\"
\"-\"
\n". "
\n". "
\n". "\n". "\n". "
\n". "\n". "\n". "\n". "\n". "
\n". "

This email was sent to ".$_SESSION['email']." by susan.brooks@internet4classrooms.com.

\n". "

Update Email Address: Simply reply to this message with \"Change Email\" and your new email address.
\n". "

Instant Removal from this list: Simply click here: \n". "Unsubscribe
\n". "

Privacy Policy

\n". "

Internet4classrooms, LLC | 250 Colegrove Street | Memphis | TN | 38120
\n". "
\n". "
\n". "
\n". "\n". "\n"; // Generate a boundary string to demarcate different types $mime_boundary = "----=_NextPart_X[".md5(time())."]"; $headers = "From: \"Internet4classrooms.com\" \r\n". // "To: \"".$_SESSION['firstname']." ".$_SESSION['lastname']."\" <".$_SESSION['email']."> \r\n". "MIME-Version: 1.0\r\n" . "Content-Type: multipart/alternative; ". "boundary=\"".$mime_boundary."\"\r\n"; // Add a multipart boundary above the plain message $newline = "\r\n"; $message = "This is a multi-part message in MIME format.\r\n\r\n". "--".$mime_boundary."\r\n". "Content-Type: text/plain; charset=\"utf-8\"\r\n". "Content-Transfer-Encoding: quoted-printable\r\n\r\n". $messageplain."\r\n\r\n". "--".$mime_boundary."\r\n". "Content-Type: text/html; charset=\"utf-8\"\r\n". "Content-Transfer-Encoding: 8bit\r\n\r\n". $messagehtml."\r\n\r\n". "--".$mime_boundary."--\r\n"; /* Sends the mail */ mail("\"".$_SESSION['firstname']." ".$_SESSION['lastname']."\" <".$_SESSION['email'].">","Thank you for joining our mailing list",$message, $headers, "-fsusan.brooks@internet4classrooms.com"); } } // Are we creating an account?: if ( isset($_POST['subscribe']) && $_POST['subscribe'] == "Submit" ) { // Assume data is good... $create_member_query="Update visitor set email='".$_POST['email']."', ". "last_datestamp='".date("Y-m-d H:i:s")."', ". "firstname='".$_POST['firstname']."', ". "lastname='".$_POST['lastname']."' ". "where visitor_id='".$_SESSION['visitor_id']."' "; // Insert the data: mysqli_query($mysqli_con,$create_member_query) or die(mysqli_error($mysqli_con)); // Update the session variables: $_SESSION['email']=$_POST['email']; $_SESSION['firstname']=$_POST['firstname']; $_SESSION['lastname']=$_POST['lastname']; $_SESSION['member_datestamp']=date("Y-m-d H:i:s"); // send email to admin about new user... $message="New I4C Newsletter Signup: ".$_SESSION['email']."\n". "Create Member Query: ".$create_member_query."\n". "Visitor ID: ".$_SESSION['visitor_id']."\n". "First: ".$_SESSION['firstname']."\n". "Last: ".$_SESSION['lastname']."\n". "Email: ".$_SESSION['email']."\n". "Country Code: ".$_SESSION['country']."\n". "Region: ".$_SESSION['region']."\n". "City: ".$_SESSION['city']."\n". "From IP: ".$_SERVER['REMOTE_ADDR']."\n"; //mail("susan.brooks@internet4classrooms.com","New I4C Newsletter Signup",$message); // Send the new newsletter list member a multi-part mime welcome email: $messageplain = "\n\n". "Internet4Classrooms.com\n". "\n". "Welcome!\n". "\n". "Dear ".$_SESSION['firstname'].",\n". "\n". "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n". "Thank you for subscribing to Internet4Classrooms.com. We are dedicated to providing the best free educational resources on the internet to teachers, parents and students. Your email address and interest preferences have been recorded in our database. In the future, you will receive periodic emails specific to your interests.\n". "\n". "Privacy is important to us; therefore, we will not sell, rent, or give your name or address to anyone. At any point, you can select the link at the bottom of every email to unsubscribe, or to receive less or more information.\n". "\n". "We look forward to hearing from you with any comments or suggestions about our website.\n". "\n". "We are currently redesigning our site to include more information that will be helpful to you and make it easier to use our great content both in the classroom and at home. So stay tuned!\n". "\n". "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n". "\n". "Thanks again for registering. If you have any questions or comments, feel free to contact us.\n". "\n". "Sincerely,\n". "\n". "Susan Brooks\n". "Internet4Classrooms, LLC\n". "\n". "------------------------------------------------------------\n". "email: susan.brooks@internet4classrooms.com\n". "web: https://www.internet4classrooms.com\n". "------------------------------------------------------------\n". "\n". "This email was sent to ".$_SESSION['email']." by susan.brooks@internet4classrooms.com.\n". "\n". "Update Profile/Email Address: Simply reply to this message with \"Change Email\" and your new email address.\n". "\n". "Instant Removal from this list: Simply go here: https://internet4classrooms.com/unsubscribe.php?email=".$_SESSION['email']."&list=newsletter_signup\n". "\n". "Privacy Policy: https://www.internet4classrooms.com/privacy-policy.htm\n". "\n". "Internet4classrooms, LLC | 250 Colegrove Street | Memphis | TN | 38120\n". "\n". "\n". "\n"; $messagehtml = "\n". "\n". "Thank you for joining our mailing list\n". "\n". "\n". "
\n". "\n". "\n". "\n". "\n". "
\n". "\"internet4classrooms\n". "
\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "

\"-\"\n". "\n". "Internet4Classrooms.com\n". "\n". "
\"-\"\"-\"
\n". "\"-\"\n". "
\n". "\n". "\n". "\n". "\n". "\n". "\n". "
\n". "\"-\"\n". "\n". "
\n". "
\n". "    \n". "Welcome!\n". "\n". "    \n". "\n". "
\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "\n". "
\n". "\"-\"\n". "\n". "\n". "\n". "\n". "\n". "
\n". "\n". "Dear ".$_SESSION['firstname'].",\n". "
\n". "

\n". "Thank you for subscribing to Internet4Classrooms.com. We are dedicated to providing the best free educational resources on the internet to teachers, parents and students. Your email address and interest preferences have been recorded in our database. In the future, you will receive periodic emails specific to your interests.\n". "

\n". "

Privacy is important to us; therefore, we will not sell, rent, or give your name or address to anyone. At any point, you can select the link at the bottom of every email to unsubscribe, or to receive less or more information.\n". "

\n". "

We look forward to hearing from you with any comments or suggestions about our website.

\n". "

We are currently redesigning our site to include more information that will be helpful to you and make it easier to use our great content both in the classroom and at home. So stay tuned!\n". "

\n". "

\n". "Thanks again for registering. If you have any questions or comments, feel free to contact us.\n". "

\n". "

Sincerely,

\n". "
\n". "Susan Brooks\n". "

Internet4classrooms, LLC\n". "


\n". "email:\n". "susan.brooks@internet4classrooms.com\n". "
\n". "
\n". "
\n". "web:\n". "https://www.internet4classrooms.com\n". "
\n". "
\n". "
\n". "\"-\"\n". "
\"-\"
\"-\"
\n". "
\n". "
\n". "\n". "\n". "
\n". "\n". "\n". "\n". "\n". "
\n". "

This email was sent to ".$_SESSION['email']." by susan.brooks@internet4classrooms.com.

\n". "

Update Email Address: Simply reply to this message with \"Change Email\" and your new email address.
\n". "

Instant Removal from this list: Simply click here: \n". "Unsubscribe
\n". "

Privacy Policy

\n". "

Internet4classrooms, LLC | 250 Colegrove Street | Memphis | TN | 38120
\n". "
\n". "
\n". "
\n". "\n". "\n"; // Generate a boundary string to demarcate different types $mime_boundary = "----=_NextPart_X[".md5(time())."]"; $headers = "From: \"Internet4classrooms.com\" \r\n". // "To: \"".$_SESSION['firstname']." ".$_SESSION['lastname']."\" <".$_SESSION['email']."> \r\n". "MIME-Version: 1.0\r\n" . "Content-Type: multipart/alternative; ". "boundary=\"".$mime_boundary."\"\r\n"; // Add a multipart boundary above the plain message $newline = "\r\n"; $message = "This is a multi-part message in MIME format.\r\n\r\n". "--".$mime_boundary."\r\n". "Content-Type: text/plain; charset=\"utf-8\"\r\n". "Content-Transfer-Encoding: quoted-printable\r\n\r\n". $messageplain."\r\n\r\n". "--".$mime_boundary."\r\n". "Content-Type: text/html; charset=\"utf-8\"\r\n". "Content-Transfer-Encoding: 8bit\r\n\r\n". $messagehtml."\r\n\r\n". "--".$mime_boundary."--\r\n"; /* Sends the mail */ mail("\"".$_SESSION['firstname']." ".$_SESSION['lastname']."\" <".$_SESSION['email'].">","Thank you for joining our mailing list",$message, $headers, "-fsusan.brooks@internet4classrooms.com"); } ?> CCSS Assessment Tasks- Common Core Standards at Internet 4


advertisement

Sign Up For Our Newsletter
Email:

CCSS Assessment Tasks

I4C

CCSS Assessment Tasks

 



Internet4Classrooms Mathematic Tasks

  1. Fifth Grade Mathematics Tasks - Individual tasks per standard for 5th grade.



Math Tasks

  1. Third - Fifth Grade Mathematics Tasks - Various Resources that include tasks, sample questions, and sample tests. Grade 3, Grade 4, Grade 5.
  2. Sixth - Eighth Grade Mathematics Tasks - Various Resources that include tasks, sample questions, and sample tests. Grade 6, Grade 7, Grade 8.
 

 

 

Internet4classrooms is a collaborative effort by Susan Brooks and Bill Byles.
 

  

Search Internet4Classrooms

Custom Search

Internet4classrooms is a collaborative effort by Susan Brooks and Bill Byles.
 

  

advertisement

advertisement

Use of this Web site constitutes acceptance of our Terms of Service and Privacy Policy


Use of this Web site constitutes acceptance of our Terms of Service and Privacy Policy