function umbrellafunction() { $db_server = mysqli_connect("localhost", "root", "root", "schedule"); $today = date("Y-m-d"); $todayactivequery = "SELECT active FROM days WHERE daate = '{$today}'"; mylog($todayactivequery); $todayactiveresult = mysqli_query($db_server, $todayactivequery); if ($todayactivequery->connect_errno) { echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error; } $row = mysqli_fetch_array($todayactiveresult, MYSQLI_ASSOC); mysqli_free_result($todayactiveresult); $active = $row['active']; if ($active === 'y') { display(); } else { echo "<h2 style='text-align: center'> We appreciate the enthusiasm, but today isn't a school day!</h2>"; } timecheck(); }
return 0; } } else { echo "ツイートしません(1)。\n"; return 0; } } //-------------------------------------------------------------------------- $MM = new Moon_Class(); $TT = new Twitter_Class(); $SunMoon = $MM->StoreSunMoon(); $Moon = $MM->StoreFullNewMoon(); if (date("H") <= 12) { $Answer = timecheck($SunMoon["sunrise_hm"]); } else { $Answer = timecheck($SunMoon["sunset_hm"]); } if (!$Answer) { exit; } $status = make_message(); //------------------------------------------------------------------------- $twitter = new tmhOauth(array("consumer_key" => $consumer_key, "consumer_secret" => $consumer_secret, "token" => $token, "secret" => $secret, "curl_ssl_verifypeer" => false)); $c = 0; $media = count($image); $result_media_id = $TT->upload_image($twitter, $image); // echo count($result_media_id); while (count($result_media_id) != $media && $c < 10) { $result_media_id = $TT->upload_image($twitter, $image); $c++; }
} echo "In time: " . $hour .":". $minutes. "<br>"; } } else { echo "0 results"; } */ ?> </center> <h3 style="text-align: center;">To Mo-Chit:</h3> <center> <?php $time = timecheck("station_a", $conn); echo $time[1]; ?> </center> </div> <div class = "navbar navbar-default navbar-fixed-bottom"> <div class = "container"> <div class="row"> <div class="col-xs-3"> <a class = "navbar-btn btn-default btn pull-left btn-block" href="index.php"><span class="glyphicon glyphicon-search"></span> Home</a> </div>