Kyberia v1.0
[mirrors/Kyberia-bloodline.git] / redakcia / update.php
CommitLineData
bc13d5d6
H
1<?php
2ini_set("include_path","/home/hromi1/kyberia/inc:/home/hromi1/kyberia/boxiky/");
3include("redakce.inc");
4$redakce=new CLASS_REDAKCE();
5include("form.inc");
6$LocalImageDir="/home/hromi1/images/clanky/";
7
8if ($id) {
9$article=$redakce->getArticleData($id);
10$article->next();
11echo "<html><head><link rel=stylesheet type=\"text/css\" href=\"./kyberia.css\"></head>";
12$form=new HTML_Form($PHP_SELF,"POST","","multipart/form-data");
13 echo "<html><head><title>Pridanie clanku</title></head><body>\n";
14 $redakce->listArticles();
15 echo "<body><table><tr>\n";
16 $form->addText("nazov","Nazov:",$article->getString("nazov"));
17 $form->addText("autor","Autor:",$article->getString("autor"));
18 $form->addfile("title_image","Titulni Obrazok:");
19 $form->addfile("image1","Obrazok:");
20 $form->addfile("image2","Obrazok:");
21 $form->addhidden("id",$id);
22 $form->addfile("image3","Obrazok:");
23 $form->addSelect("id_rubrika","Rubrika",$redakce->listRubrikyArray());
24 $form->addSelect("id_rubrika_secondary","Sekundarna rubrika",$redakce->listRubrikyArray());
25 $form->addTextarea("short_desc","Kraktky popis",$article->getString("short_desc"),40,6);
26 $form->addTextarea("text1","Text:",stripslashes($article->getString("text1")),80,23);
27 $form->addTextarea("text2","Text:",stripslashes($article->getString("text2")),40,6);
28 $form->addTextarea("text3","Text:",stripslashes($article->getString("text3")),40,6);
29 $form->addTextarea("keywords","Keywords:",stripslashes($article->getString("keywords")),40,6);
30 $form->addSubmit("submit","pridaj","");
31 $form->display();
32 echo "</body></html>";
33}
34
35
36
37if ($submit=="pridaj") {
38
39if (IsSet($title_image)) {
40 Copy($title_image,$LocalImageDir.$title_image_name);
41}
42
43if (IsSet($image1)) {
44 Copy($image1,$LocaImageDir.$image1_name);
45}
46if ($image2!="") {
47 Copy($image2,$LocaImageDir.$image2_name);
48}
49if ($image3!="") {
50 Copy($image3,$LocaImageDir.$image3_name);
51}
52
53
54
55 $redakce->updateArticle($HTTP_POST_VARS);
56}
57
58
59
60?>
This page took 0.115946 seconds and 4 git commands to generate.