summary refs log tree commit diff stats
path: root/includes/update.php
blob: 6c8d9ffd71d52c68e1d0fd60b26cc6331464524f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

$getlast = "SELECT * FROM config WHERE name = \"lastUpdated\"";
$getlast2 = mysql_query($getlast);
$getlast3 = mysql_fetch_array($getlast2);

$last = $getlast3['value'];
if ($last != date('md'))
{
	$getpending = "SELECT * FROM comics WHERE status = \"pending\" ORDER BY id ASC LIMIT 0,1";
	$getpending2 = mysql_query($getpending);
	$getpending3 = mysql_fetch_array($getpending2);
	if (!empty($getpending3))
	{
		$id = next_comic_id();

		$setcomic = "UPDATE comics SET status = \"publish\", comic_id = " . $id . " WHERE id = " . $getpending3['id'];
	        $setcomic2 = mysql_query($setcomic) or die($setcomic);

		$insmeta = "INSERT INTO meta (comic_id,name,value) VALUES (" . $getpending3['id'] . ",\"pubDate\",\"" . date('Y-m-d H:i:s') . "\")";
		$insmeta2 = mysql_query($insmeta) or die($insmeta);

		$setconfig = "UPDATE config SET value = \"" . date('md') . "\" WHERE name = \"lastUpdated\"";
		$setconfig2 = mysql_query($setconfig);
	}
}

?>
color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#puzzle {
  touch-action: none;
}

#banner {
  background-image: image-url("wittle_header.png");
  background-size: cover;
  width: 600px;
  height: 245px;
  margin: 0 auto;

  h1 {
    margin: 0;

    a {
      display: block;
      width: 600px;
      height: 245px;
      text-indent: -5000px;
      text-decoration: none;
      margin: 0;
    }
  }
}

h1 {
  text-align: center;
}

.puzzle-description {
  text-align: center;
  display: block;
  margin-top: -1em;
  margin-bottom: 2em;
  font-size: 1.25em;
}

#trace-settings {
  margin: 1em auto;
  width: 540px;

  summary {
    text-align: center;
  }
}

#sens, #volume {
  background-image: linear-gradient(to right, #EEE, #555);
}

/* Slider control main bar */
input[type="range"] {
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  border-radius: 3px;
  height: 15px;
  margin-bottom: 5px;
  margin-top: 5px;
  outline: none;
  width: 100%;
}
/* Slider control icon */
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  background: image-url('slider.png');
  background-size: 17px 33px;
  height: 33px;
  width: 17px;
}
input[type="range"]::-moz-range-thumb {
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  background: image-url('slider.png');
  background-size: 17px 33px;
  height: 33px;
  width: 17px;
}
input[type="range"]::-ms-thumb {
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  background: image-url('slider.png');
  background-size: 17px 33px;
  height: 33px;
  width: 17px;
}

#submission-form {
  margin: 1em auto;
  width: 540px;
  text-align: center;

  form {
    border: 1px solid black;
    width: max-content;
    padding: 0 2em;
    margin: 0 auto;
  }
}

#scores {
  display: flex;

  div {
    flex: 0 0 48%;

    h2 {
      text-align: center;
    }

    table {
      width: max-content;
      margin: 0 auto;
    }
  }
}

#activation-button {
  button {
    display: block;
    margin: 0 auto;
    width: 25%;
    background-color: #04AA6D;
    padding: 14px 28px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    color: white;
  }
}

#timer {
  width: max-content;
  margin: 0.5em auto 0;
  font-size: 3em;

  %label {
    padding: 0;
  }
}

.score-field {
  padding-left: 1em;
  text-align: right;
}

#archive {
  width: 50%;
  margin: 0 auto;
  border-spacing: 0;
  text-align: center;

  tr {
    &.odd {
      background-color: #fff;
    }

    &.even {
      background-color: #edf;
    }
  }

  th, td {
    padding: 0.5em;
  }

  ul {
    list-style-type: none;
    padding: 0;
  }
}

#current-date {
  margin-top: 1em;
  text-align: center;
}

#choose-difficulty {
  margin: 1em auto 2em;
  width: max-content;
  display: flex;
}

#normal-link {
  width: 215px;
  margin-right: 1em;

  a {
    background-image: image-url("wittle_normal.png");
    background-size: cover;
    display: block;
    width: 215px;
    height: 215px;
    text-indent: -5000px;
    text-decoration: none;
    margin: 0;
  }
}

#hard-link {
  width: 215px;
  margin-right: 1em;

  a {
    background-image: image-url("wittle_hard.png");
    background-size: cover;
    display: block;
    width: 215px;
    height: 215px;
    text-indent: -5000px;
    text-decoration: none;
    margin: 0;
  }
}

#expert-link {
  width: 215px;

  a {
    background-image: image-url("wittle_expert.png");
    background-size: cover;
    display: block;
    width: 215px;
    height: 215px;
    text-indent: -5000px;
    text-decoration: none;
    margin: 0;
  }
}

.summary {
  width: 50%;
  min-width: 600px;
  margin: 0 auto 1em;
}

.puzzle-status {
  text-align: center;
  margin-bottom: 0;
}

.breadcrumb {
  text-align: center;

  a, a:visited {
    color: #555d66;
    text-decoration: none;
  }

  a:hover {
    text-decoration: underline;
  }
}

#new-puzzles {
  text-align: center;
  font-size: 1.25em;
  margin-bottom: 1em;
}