document.write("<div class=\"pastie\">\n");
document.write("  <link href=\"http://pastie.org/stylesheets/embed.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  <link href=\"http://pastie.org/stylesheets/clean.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  \n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("	\n");
document.write("	<div class=\"allcode\">\n");
document.write("		<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n");
document.write("		<tr>\n");
document.write("			<td>\n");
document.write("				\n");
document.write("				<pre class=\"textmate-source-numbers\">1\n");
document.write("2\n");
document.write("3\n");
document.write("4\n");
document.write("5\n");
document.write("6\n");
document.write("7\n");
document.write("8\n");
document.write("9\n");
document.write("10\n");
document.write("11\n");
document.write("12\n");
document.write("13\n");
document.write("14\n");
document.write("15\n");
document.write("16\n");
document.write("17\n");
document.write("18\n");
document.write("19\n");
document.write("20\n");
document.write("21\n");
document.write("22\n");
document.write("23\n");
document.write("24\n");
document.write("25\n");
document.write("26\n");
document.write("27\n");
document.write("28\n");
document.write("29\n");
document.write("30\n");
document.write("31\n");
document.write("32\n");
document.write("33\n");
document.write("34\n");
document.write("<\/pre>\n");
document.write("			<\/td>\n");
document.write("		<td>\n");
document.write("		<pre class=\"textmate-source\"><pre class=\"sunburst\"><span class=\'source source_php source_php_embedded source_php_embedded_block source_php_embedded_block_html\'>&lt;?php\n");
document.write("<span class=\'comment comment_block comment_block_php\'>/* the one in which we get the username figured out from the pin */<\/span>\n");
document.write("<span class=\'meta meta_include meta_include_php\'><span class=\'keyword keyword_control keyword_control_import keyword_control_import_include keyword_control_import_include_php\'>include<\/span>(<span class=\'string string_quoted string_quoted_double string_quoted_double_php\'>&quot;<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php\'>../dbonline.php<\/span>&quot;<\/span>)<\/span>;\n");
document.write("<span class=\'variable variable_other variable_other_php\'>$pin<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'variable variable_other variable_other_global variable_other_global_php\'>$_POST<\/span>[<span class=\'string string_quoted string_quoted_double string_quoted_double_php\'>&quot;<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php\'>Digits<\/span>&quot;<\/span>];\n");
document.write("<span class=\'variable variable_other variable_other_php\'>$invalid<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>;\n");
document.write("<span class=\'variable variable_other variable_other_php\'>$username<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'string string_quoted string_quoted_double string_quoted_double_php\'>&quot;<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php\'><\/span>&quot;<\/span>;\n");
document.write("<span class=\'variable variable_other variable_other_php\'>$q<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'string string_quoted string_quoted_double string_quoted_double_sql string_quoted_double_sql_php\'>&quot;<span class=\'source source_sql source_sql_embedded source_sql_embedded_php\'><span class=\'keyword keyword_other keyword_other_DML keyword_other_DML_sql\'>SELECT<\/span> * <span class=\'keyword keyword_other keyword_other_DML keyword_other_DML_sql\'>FROM<\/span> <span class=\'string string_quoted string_quoted_other string_quoted_other_backtick string_quoted_other_backtick_sql\'>`players`<\/span> <span class=\'keyword keyword_other keyword_other_DML keyword_other_DML_sql\'>WHERE<\/span> <span class=\'string string_quoted string_quoted_other string_quoted_other_backtick string_quoted_other_backtick_sql\'>`pin`<\/span> = <span class=\'string string_quoted string_quoted_single string_quoted_single_sql\'>\'<span class=\'variable variable_other variable_other_php\'>$pin<\/span>\'<\/span> <span class=\'keyword keyword_other keyword_other_DML keyword_other_DML_sql\'>LIMIT<\/span> <span class=\'constant constant_numeric constant_numeric_sql\'>1<\/span>;<\/span>&quot;<\/span>;\n");
document.write("<span class=\'variable variable_other variable_other_php\'>$r<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'support support_function support_function_php_mysql support_function_php_mysql_php\'>mysql_query<\/span>(<span class=\'variable variable_other variable_other_php\'>$q<\/span>);\n");
document.write("<span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'support support_function support_function_php_mysql support_function_php_mysql_php\'>mysql_num_rows<\/span>(<span class=\'variable variable_other variable_other_php\'>$r<\/span>) <span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>==<\/span> <span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>) {\n");
document.write("  <span class=\'comment comment_block comment_block_php\'>/* invalid pin */<\/span>\n");
document.write("  <span class=\'variable variable_other variable_other_php\'>$invalid<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>;\n");
document.write("} <span class=\'keyword keyword_control keyword_control_php\'>else<\/span> {\n");
document.write("  <span class=\'variable variable_other variable_other_php\'>$username<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'support support_function support_function_php_mysql support_function_php_mysql_php\'>mysql_result<\/span>(<span class=\'variable variable_other variable_other_php\'>$r<\/span>, <span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>, <span class=\'string string_quoted string_quoted_double string_quoted_double_php\'>&quot;<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php\'>username<\/span>&quot;<\/span>);\n");
document.write("}\n");
document.write("\n");
document.write("    <span class=\'support support_function support_function_head support_function_head_php\'>header<\/span>(<span class=\'string string_quoted string_quoted_double string_quoted_double_php\'>&quot;<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php\'>content-type: text/xml<\/span>&quot;<\/span>);\n");
document.write("    <span class=\'support support_function support_function_construct support_function_construct_php\'>echo<\/span> <span class=\'string string_quoted string_quoted_double string_quoted_double_php\'>&quot;<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php\'>&lt;?xml version=<span class=\'constant constant_character constant_character_escape constant_character_escape_php\'>\\&quot;<\/span>1.0<span class=\'constant constant_character constant_character_escape constant_character_escape_php\'>\\&quot;<\/span> encoding=<span class=\'constant constant_character constant_character_escape constant_character_escape_php\'>\\&quot;<\/span>UTF-8<span class=\'constant constant_character constant_character_escape constant_character_escape_php\'>\\&quot;<\/span>?&gt;<span class=\'constant constant_character constant_character_escape constant_character_escape_php\'>\\n<\/span><\/span>&quot;<\/span>;\n");
document.write("<span class=\'source source_php\'>?<\/span>&gt;<\/span>\n");
document.write("&lt;Response&gt;\n");
document.write("  <span class=\'source source_php source_php_embedded source_php_embedded_block source_php_embedded_block_html\'>&lt;? \n");
document.write("    <span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'variable variable_other variable_other_php\'>$invalid<\/span> <span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>==<\/span> <span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>) {\n");
document.write("      <span class=\'support support_function support_function_construct support_function_construct_php\'>echo<\/span> <span class=\'string string_quoted string_quoted_double string_quoted_double_php\'>&quot;<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php\'><\/span><\/span>\n");
document.write("<span class=\"String\"><span class=\"String\">        &lt;Say&gt;Sorry. That pin is not recognized.&lt;/Say&gt;<\/span><\/span>\n");
document.write("<span class=\"String\"><span class=\"String\">        &lt;Redirect&gt;http://twilio.jazzychad.com/phonesimon/twilio/1.php&lt;/Redirect&gt;<\/span>&quot;<\/span>;\n");
document.write("\n");
document.write("    } <span class=\'comment comment_block comment_block_php\'>/* end if */<\/span>\n");
document.write("    <span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'variable variable_other variable_other_php\'>$username<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>!<\/span><span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'string string_quoted string_quoted_double string_quoted_double_php\'>&quot;<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php\'><\/span>&quot;<\/span>) {\n");
document.write("      <span class=\'support support_function support_function_construct support_function_construct_php\'>echo<\/span> <span class=\'string string_quoted string_quoted_double string_quoted_double_php\'>&quot;<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php\'><\/span><\/span>\n");
document.write("<span class=\"String\"><span class=\"String\">        &lt;Say&gt;Thank you.&lt;/Say&gt;<\/span><\/span>\n");
document.write("<span class=\"String\"><span class=\"String\">        &lt;Redirect&gt;http://twilio.jazzychad.com/phonesimon/twilio/4.php?username=<span class=\'variable variable_other variable_other_php\'>$username<\/span>&lt;/Redirect&gt;<\/span>&quot;<\/span>;\n");
document.write("    }\n");
document.write("\n");
document.write("  <span class=\'source source_php\'>?<\/span>&gt;<\/span>\n");
document.write("&lt;/Response&gt;\n");
document.write("<\/pre><\/pre>\n");
document.write("		<\/td>\n");
document.write("		<\/tr>\n");
document.write("		<\/table>\n");
document.write("	\n");
document.write("	<\/div>\n");
document.write("\n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("  <div class=\"credit\">\n");
document.write("    <div class=\"buttons\">\n");
document.write("      <a href=\"http://pastie.org/pastes/576399.txt\">\n");
document.write("      <img src=\"http://pastie.org/images/view.png\" height=\"20\" width=\"67\" /><\/a>\n");
document.write("    <\/div>\n");
document.write("  \n");
document.write("    <a href=\"http://pastie.org/576399\">Pastie #576399<\/a> linked directly from <a href=\"http://pastie.org/\">Pastie<\/a>.\n");
document.write("  <\/div><\/div>");

