/**
 * Check the status of the site. If it is the end of the work week the site willpause,
 * if it is the beginning of the work week the site will unpause(resume)
 * 
 * @return Boolean - True if site is not paused
 */
function site_status_check()
{
    $now = time();
    $ret = true;
    if (date('D', $now) == 'Fri' && date('H', $now) >= PROD_END_HOUR) {
        // End of the work week. Pause the site
        pause_site();
        $ret = false;
    } else {
        if (date('D', $now) == 'Mon' && date('H', $now) >= 8) {
            // Beginning of the work week. Resume the site
            resume_site();
        }
    }
    return 1;
}
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * @category  Microsoft
 * @package   DealOfTheDay
 * @author    Ben Lobaugh <*****@*****.**>
 * @copyright 2011 Copyright Microsoft Corporation. All Rights Reserved
 * @license   http://www.apache.org/licenses/LICENSE-2.0
 *
 * 
 * 
 * @todo Make setup smarter
 **/
require_once 'include.php';
require_once 'storage_integrity_check.php';
if (isset($_POST['Pause'])) {
    pause_site();
}
if (isset($_POST['Resume'])) {
    resume_site();
}
?>
<p>Your storage has been initialized and is ready to use</p>
<form action="" method="post">
    <input type="submit" name="Pause" value="Pause Site"/> <input type="submit" name="Resume" value="Resume Site"/>
</form>
<br/><br/><p><strong>Having this file public is dangerous! When you no longer need it please remove it from your deployment.</strong></p>