Initial commit
This commit is contained in:
commit
a70d09915f
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
printf -v file "%q" "$1"
|
||||
printf -v title "%q" "$2"
|
||||
printf -v hover "%q" "$3"
|
||||
|
||||
mysql -u web -e"SET @file '$file'; SET @title '$title'; SET @hover '$hover';" < add_image.sql
|
|
@ -0,0 +1,2 @@
|
|||
USE web
|
||||
INSERT INTO comics (file,title,hover) VALUES ('@file','@title','@hover')
|
Binary file not shown.
|
@ -0,0 +1,18 @@
|
|||
tr {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between; }
|
||||
|
||||
a img {
|
||||
width: 32px;
|
||||
transition: all 0.2s; }
|
||||
a img:hover {
|
||||
width: 64px; }
|
||||
|
||||
#comic {
|
||||
margin: 0 auto; }
|
||||
|
||||
.strip {
|
||||
width: 512px; }
|
||||
|
||||
/*# sourceMappingURL=style.css.map */
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "AAAA,EAAG;EACC,OAAO,EAAC,IAAI;EACZ,cAAc,EAAE,GAAG;EACnB,eAAe,EAAE,aAAa;;AAI9B,KAAG;EACC,KAAK,EAAC,IAAI;EACV,UAAU,EAAE,QAAQ;EACpB,WAAO;IACH,KAAK,EAAE,IAAI;;AAIvB,MAAO;EACH,MAAM,EAAE,MAAM;;AAGlB,MAAO;EACH,KAAK,EAAC,KAAK",
|
||||
"sources": ["style.scss"],
|
||||
"names": [],
|
||||
"file": "style.css"
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
tr {
|
||||
display:flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
a{
|
||||
img{
|
||||
width:32px;
|
||||
transition: all 0.2s;
|
||||
&:hover{
|
||||
width: 64px;
|
||||
}
|
||||
}
|
||||
}
|
||||
#comic {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.strip {
|
||||
width:512px;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
require "setup.php";
|
||||
if(is_null($comic)){
|
||||
$comic=0;
|
||||
die("comic is null");
|
||||
}
|
||||
?><!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link href="css/style.css" rel="stylesheet"/>
|
||||
<title>
|
||||
<?php $comic["title"]?>
|
||||
</title>
|
||||
</head>
|
||||
<table id=comic>
|
||||
<tr><td colspan=5>
|
||||
<img class=strip title=<?php echo "\"${comic["hover"]}\"";?> src=<?php echo "\"${comic["file"]}\""?> /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href=index.php?id=0><img title="first comic" src="images/first.png"></a></td>
|
||||
<td><a href=index.php?id=<?php echo $id-1?>><img title="previous comic" src=images/prev.png></a></td>
|
||||
<td></td>
|
||||
<td><a href=index.php?id=<?php echo $id+1?>><img title="next comic" src=images/next.png></a></td>
|
||||
<td><a href=index.php ><img title="latest comic" src="images/latest.png" ></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
$id=0;
|
||||
if(!is_null($_GET["id"]) and is_numeric($_GET["id"])){
|
||||
$id=$_GET["id"];
|
||||
}
|
||||
$msql=new mysqli('localhost','web','','web');
|
||||
if($msql->connect_errno){
|
||||
die("connection error: ".$msql->connect_error);
|
||||
}
|
||||
$string="SELECT id,file,title,hover FROM comics ORDER BY CASE WHEN (id='$id') THEN 0 ELSE 1 END, id DESC";
|
||||
$qry=$msql->query($string) or die($msql->error);
|
||||
$comic=$qry->fetch_assoc();
|
||||
?>
|
Loading…
Reference in New Issue