diff options
Diffstat (limited to 'public')
-rw-r--r-- | public/css/style.css | 0 | ||||
-rw-r--r-- | public/css/styleadmin.css | 68 | ||||
-rw-r--r-- | public/css/stylebase.css | 7 | ||||
-rw-r--r-- | public/css/stylehome.css | 55 | ||||
-rw-r--r-- | public/css/styleinfo.css | 80 | ||||
-rw-r--r-- | public/css/stylemedia.css | 99 | ||||
-rw-r--r-- | public/w/home.php | 19 | ||||
-rw-r--r-- | public/w/index.php | 87 | ||||
-rw-r--r-- | public/w/menu.php | 17 |
9 files changed, 346 insertions, 86 deletions
diff --git a/public/css/style.css b/public/css/style.css deleted file mode 100644 index e69de29..0000000 --- a/public/css/style.css +++ /dev/null diff --git a/public/css/styleadmin.css b/public/css/styleadmin.css index aacca33..a3fcc5c 100644 --- a/public/css/styleadmin.css +++ b/public/css/styleadmin.css @@ -1,3 +1,71 @@ +section { + margin-bottom: 100px; +} + +article { + border: 1px var(--color4) solid; + margin: 2px; + padding: 2px; + border: ridge; + max-width: 500px; + background-color: var(--color3); +} + +h1 { + border: ridge; + background-color: var(--color1); +} + +h2 { + margin-top: 0; + margin-bottom: 5px; +} + + +form { + display: inline-grid; + width: 98%; + margin: 1%; +} + +textarea#cssarea { + height: 400px; +} + +label { + font-weight: bold; + font-style: italic; +} + +summary { + background-color: var(--color1); + border: outset; + font-weight: bold; +} + +summary:focus { + outline: none; +} + +details { + background-color: var(--color1); + border: 1px var(--color4) solid; +} + + + +@media (max-width: 600px) { + nav { + width: unset; + position: relative; + display: block; + } + + div#menu { + display: block; + } +} + @media (max-width: 600px) { nav { diff --git a/public/css/stylebase.css b/public/css/stylebase.css index 581994d..c733e79 100644 --- a/public/css/stylebase.css +++ b/public/css/stylebase.css @@ -1,13 +1,14 @@ :root { --color1: lightgrey; --color2: lightslategrey; - --color3: white; + --color3: #ececec; --color4: grey; } body { margin: 0; font-family: monospace; + background-color: var(--color4); } @@ -26,7 +27,7 @@ nav { right: 0; z-index: 10; background-color: var(--color1); - border: ridge 1px grey; + border: ridge; } div#menu { @@ -42,7 +43,7 @@ nav a { } nav a:hover { - background-color: var(--color2); + background-color: var(--color3); } nav #loginpass { diff --git a/public/css/stylehome.css b/public/css/stylehome.css index beaae93..aa8daf2 100644 --- a/public/css/stylehome.css +++ b/public/css/stylehome.css @@ -1,39 +1,51 @@ -div#options { - background-color: var(--color1); +section.home { + margin-top: 27px; + display: inline-flex; + width: 100%; } -#home2table { +div#main { + border: ridge; + height: fit-content; + margin: 5px; background-color: var(--color3); } -header { - background-color: var(--color1); -} +div#options { + border: ridge; + margin: 5px; + background-color: var(--color3); + width: 15%; + list-style: none; + max-width: 200px; +} +fieldset { + background-color: var(--color1); + border: outset; +} +legend { + font-weight: bold; +} -section.home { - margin-top: 20px; - display: inline-flex; - width: 100%; +div#massedit { + background-color: var(--color1); } header { position: fixed; width: 100%; - border: ridge 1px grey; + border: ridge; + background-color: var(--color1); } - -div#options { - width: 15%; - list-style: none; -} - - -#home2table { - width: 85%; +h2 { + font-size: large; + margin: 0; + border: outset; + background-color: var(--color1); } #options ul { @@ -42,6 +54,9 @@ div#options { padding: 0; } +#home2table { + background-color: var(--color3); +} #home2table tr:hover { background-color: var(--color1); diff --git a/public/css/styleinfo.css b/public/css/styleinfo.css new file mode 100644 index 0000000..a3fcc5c --- /dev/null +++ b/public/css/styleinfo.css @@ -0,0 +1,80 @@ +section { + margin-bottom: 100px; +} + +article { + border: 1px var(--color4) solid; + margin: 2px; + padding: 2px; + border: ridge; + max-width: 500px; + background-color: var(--color3); +} + +h1 { + border: ridge; + background-color: var(--color1); +} + +h2 { + margin-top: 0; + margin-bottom: 5px; +} + + +form { + display: inline-grid; + width: 98%; + margin: 1%; +} + +textarea#cssarea { + height: 400px; +} + +label { + font-weight: bold; + font-style: italic; +} + +summary { + background-color: var(--color1); + border: outset; + font-weight: bold; +} + +summary:focus { + outline: none; +} + +details { + background-color: var(--color1); + border: 1px var(--color4) solid; +} + + + +@media (max-width: 600px) { + nav { + width: unset; + position: relative; + display: block; + } + + div#menu { + display: block; + } +} + + +@media (max-width: 600px) { + nav { + width: unset; + position: relative; + display: block; + } + + div#menu { + display: block; + } +}
\ No newline at end of file diff --git a/public/css/stylemedia.css b/public/css/stylemedia.css index a2f9800..d721a9b 100644 --- a/public/css/stylemedia.css +++ b/public/css/stylemedia.css @@ -1,61 +1,84 @@ -section { - padding: 0; +article { + border: 1px var(--color4) solid; + margin: 2px; + padding: 2px; + border: ridge; + max-width: 700px; + background-color: var(--color3); } -.infobulle { - display: none; +h1 { + border: ridge; + background-color: var(--color1); } -.little:hover .infobulle { - display: inline-block; - position: relative; - background-color: white; - z-index: 5; - top: 5px; - width: 300px; - font-family: monospace; - font-size: 0.9em; - line-height: 1.1em; +h2 { + margin-top: 0; + margin-bottom: 5px; } -span.infobulle img { - width: 100%; + +form { + display: inline-grid; + width: 98%; + margin: 1%; } -.grid { - display: flex; - flex-wrap: wrap; - padding: 4%; - margin-right: 120px; - list-style: none; +label { + font-weight: bold; + font-style: italic; } -.little { - width: 100px; - height: 150px; - margin: 10px; - background-color: white; +summary { + background-color: var(--color1); + border: outset; + font-weight: bold; +} +summary:focus { + outline: none; } -.infobulle input[type="text"] { - font-family: monospace; - font-size: 0.9em; - margin: 3px; +details { + background-color: var(--color1); + border: 1px var(--color4) solid; } -img.thumbnail { - max-width: 100%; - max-height: 100px; + +#mediatable { + background-color: var(--color3); +} + +#mediatable tr:hover { + background-color: var(--color1); } -section.gest { - padding-bottom: 300px; +#mediatable th { + background-color: var(--color1); + border: ridge 1px grey; } -input[type="file"] { - font-size: 1.3em; +.tooltip span { + display: none; + color: #000; + text-decoration: none; + padding: 3px; +} + +.tooltip:hover span { + display: block; + position: absolute; + background-color: var(--color3); + border: ridge; + margin-left: 30px; + margin-top: 0px; +} + + +img.thumbnail { + max-width: 100%; + max-height: 150px; } input[type="checkbox"] { diff --git a/public/w/home.php b/public/w/home.php index 4966c62..7115918 100644 --- a/public/w/home.php +++ b/public/w/home.php @@ -19,7 +19,7 @@ if ($app->session() >= $app::EDITOR) { } if(isset($_GET['submit']) && $_GET['submit'] == 'reset') { $opt = new Opt(Art::classvarlist()); - } else { + } elseif(isset($_SESSION['opt'])) { $opt->hydrate($_SESSION['opt']); } @@ -37,17 +37,26 @@ if ($app->session() >= $app::EDITOR) { $filter = array_intersect($filtertagfilter, $filtersecure); $table2 = []; + $table2invert = []; foreach ($table as $art) { - if (in_array($art->id(), $filter)) { - $table2[] = $art; - } + if (in_array($art->id(), $filter)) { + $table2[] = $art; + } else { + $table2invert[] = $art; + } + + + } + + if(!empty($opt->invert())) { + $table2 = $table2invert; } $app->artlistsort($table2, $opt->sortby(), $opt->order()); - $aff->home2table($app, $table2); + $aff->home2table($app, $table2, $app->getlister()); } diff --git a/public/w/index.php b/public/w/index.php index d9b9d5c..5a3fe4e 100644 --- a/public/w/index.php +++ b/public/w/index.php @@ -154,25 +154,84 @@ if (isset($_POST['action'])) { case 'massedit': if (isset($_POST['id'])) { foreach ($_POST['id'] as $id) { - $art = new Art(['id' => $id]); - if ($_POST['massedit'] == 'delete' && $app->exist($id)) { - $app->delete($art); - } - if ($_POST['massedit'] >= 0 && $app->exist($id)) { + if ($app->exist($id)) { $art = $app->get($id); - $art->setsecure($_POST['massedit']); - $app->update($art); + + switch ($_POST['massaction']) { + case 'do': + switch ($_POST['massedit']) { + case 'delete': + $app->delete($art); + break; + + case 'erasetag': + $art->settag(''); + $app->update($art); + break; + + case 'erasetemplate': + $art->settemplate(''); + $app->update($art); + break; + + case 'not published': + $art->setsecure(2); + $app->update($art); + break; + + case 'private': + $art->setsecure(1); + $app->update($art); + break; + + case 'public': + $art->setsecure(0); + $app->update($art); + break; + } + break; + + case 'set template': + if (isset($_POST['masstemplate'])) { + $art->settemplate($_POST['masstemplate']); + $app->update($art); + } + break; + + case 'add tag': + if (isset($_POST['targettag'])) { + $art = $app->get($id); + $tagstring = strip_tags(trim(strtolower($_POST['targettag']))); + $taglist = str_replace(' ', '', $tagstring); + $taglist = explode(",", $taglist); + foreach ($taglist as $tag) { + if (!in_array($tag, $art->tag('array'))) { + $newtaglist = $art->tag('array'); + array_push($newtaglist, $tag); + $art->settag($newtaglist); + } + } + $app->update($art); + } + break; + + } + + + + } header('Location: ./'); } - + break; } - break; - } - } + + + + if (isset($_POST['actiondb'])) { $app->setbdd($config); @@ -200,7 +259,7 @@ if (isset($_GET['id'])) { if (!isset($_GET['edit'])) { $_GET['edit'] = 0; } - $aff->arthead($art, $config->cssread(), $_GET['edit']); + $aff->arthead($art, $app::CSS_READ_DIR, $config->cssread(), $_GET['edit']); } else { $aff->head($_GET['id'], ''); @@ -235,15 +294,13 @@ if (isset($_GET['message'])) { $aff->nav($app); - - if (array_key_exists('id', $_GET)) { $app->bddinit($config); include('article.php'); } elseif (array_key_exists('tag', $_GET)) { $app->bddinit($config); echo '<h4>' . $_GET['tag'] . '</h4>'; - $aff->tag($app->getlister(['id', 'titre', 'intro', 'tag'], 'id'), $_GET['tag'], $app); + $aff->tag($app->getlister(['id', 'titre', 'intro', 'tag']), $_GET['tag'], $app); } elseif (array_key_exists('lien', $_GET)) { $app->bddinit($config); echo '<h4><a href="?id=' . $_GET['lien'] . '">' . $_GET['lien'] . '</a></h4>'; diff --git a/public/w/menu.php b/public/w/menu.php index b2495f2..58cc93e 100644 --- a/public/w/menu.php +++ b/public/w/menu.php @@ -11,19 +11,22 @@ if ($app->session() >= $app::EDITOR) { $aff->adminpassword($config); $aff->admindb($config); if ($app->setbdd($config)) { - //var_dump($app->tablelist($config->dbname())); - echo '<p>database status : OK</p>'; + $status = "OK"; + } else { + $status = "Not Connected"; } - $aff->admintable($config, $app->tablelist($config->dbname())); + $aff->admintable($config, $status, $app->tablelist($config->dbname())); echo '</section>'; } elseif ($_GET['aff'] == 'media') { echo '<h1>Media</h1>'; echo '<section>'; + echo '<article>'; $aff->addmedia($app); - $aff->medialist($app); + $aff->medialist($app->getlistermedia($app::MEDIA_DIR), $app::MEDIA_DIR); + echo '</article>'; echo '</section>'; } elseif ($_GET['aff'] == 'record') { @@ -34,7 +37,11 @@ if ($app->session() >= $app::EDITOR) { echo '</section>'; - } elseif ($_GET['aff'] == 'map') { + } elseif ($_GET['aff'] == 'info') { + + + + } elseif ($_GET['aff'] == 'map' && $app->session() >= $app::INVITE) { $app->bddinit($config); $aff->map($app, $config->domain()); } else { |