1 |
<?php |
<?php |
2 |
|
set_magic_quotes_runtime(false); |
3 |
# ---KLUDGE-BEGIN--- |
# ---KLUDGE-BEGIN--- |
4 |
function ss(&$i, $k) { |
function ss(&$i, $k) { |
5 |
if (is_array($i)) array_walk($i, "ss"); |
if (is_array($i)) array_walk($i, "ss"); |
10 |
$ss = array("HTTP_GET_VARS", "HTTP_POST_VARS", "HTTP_POST_FILES"); |
$ss = array("HTTP_GET_VARS", "HTTP_POST_VARS", "HTTP_POST_FILES"); |
11 |
while (list($key, $val) = each($ss)) array_walk($$val, "ss"); |
while (list($key, $val) = each($ss)) array_walk($$val, "ss"); |
12 |
# ---KLUDGE-END--- |
# ---KLUDGE-END--- |
13 |
$phptmp = "php"; |
$phptmp = "^php"; |
14 |
function sql($sql) { |
function sql($sql) { |
15 |
# echo "<TT><B>[SQL]</B> $sql<BR>\n"; |
#echo "<TT><B>[SQL]</B> $sql<BR>\n"; |
16 |
} |
} |
17 |
function newsEdit($art, $trigger = "") { |
function my_cmp($a, $b) { return MyCompare($a["txt"], $b["txt"]); } |
18 |
global $phptmp, $picdir, $syspicdir, $section, $dbh, $tpl; |
function newsEdit($art, $trigger = "", $isVijest = false) { |
19 |
global $ed_id, $ed_cat; |
global $phptmp, $picdir, $syspicdir, $aupicdir, $sysaupicdir, $dbh, $tpl; |
20 |
|
global $section, $section_menu, $section_menu2, $spec; |
21 |
|
global $ed_id, $ed_cat, $isMed; |
22 |
$i = 1; |
$i = 1; |
23 |
global $ed_delete_main, $ed_del_main; |
global $ed_delete_main, $ed_del_main; |
24 |
$delete_main = $ed_delete_main; |
$delete_main = $ed_delete_main; |
25 |
$del_main = $ed_del_main; |
$del_main = $ed_del_main; |
26 |
global $ed_clear_main, $ed_clr_main; |
global $ed_clear_main, $ed_clr_main; |
27 |
|
global $ed_clear_author, $ed_clr_author; |
28 |
$clear_main = $ed_clear_main; |
$clear_main = $ed_clear_main; |
29 |
$clr_main = $ed_clr_main; |
$clr_main = $ed_clr_main; |
30 |
|
$clear_author = $ed_clear_author; |
31 |
|
$clr_author = $ed_clr_author; |
32 |
global $ed_titlepic_url, $ed_titlepic_url2, $ed_titlepic_name; |
global $ed_titlepic_url, $ed_titlepic_url2, $ed_titlepic_name; |
33 |
$titlepic_url = $ed_titlepic_url; |
$titlepic_url = $ed_titlepic_url; |
34 |
$titlepic_url2 = $ed_titlepic_url2; |
$titlepic_url2 = $ed_titlepic_url2; |
35 |
$titlepic_name = $ed_titlepic_name; |
$titlepic_name = urldecode($ed_titlepic_name); |
36 |
|
# Fix for M$IE |
37 |
if ($titlepic_url == "none") $titlepic_url = ""; |
if ($titlepic_url == "none") $titlepic_url = ""; |
38 |
|
global $ed_author_url, $ed_author_url2, $ed_author_name; |
39 |
|
$author_url = $ed_author_url; |
40 |
|
$author_url2 = $ed_author_url2; |
41 |
|
$author_name = urldecode($ed_author_name); |
42 |
|
# Fix for M$IE |
43 |
|
if ($author_url == "none") $author_url = ""; |
44 |
while (true) { |
while (true) { |
45 |
global ${"ed_text_id_".$i}; |
global ${"ed_text_id_".$i}; |
46 |
if (!isset(${"ed_text_id_".$i})) break; |
if (!isset(${"ed_text_id_".$i})) break; |
50 |
global ${"ed_clear_".$i}, ${"ed_clr_".$i}; |
global ${"ed_clear_".$i}, ${"ed_clr_".$i}; |
51 |
${"clear_".$i} = ${"ed_clear_".$i}; |
${"clear_".$i} = ${"ed_clear_".$i}; |
52 |
${"clr_".$i} = ${"ed_clr_".$i}; |
${"clr_".$i} = ${"ed_clr_".$i}; |
53 |
global ${"ed_textpic_url_".$i}, |
global ${"ed_textpic_url_".$i}, ${"ed_textpic_url2_".$i}, ${"ed_textpic_name_".$i}; |
|
${"ed_textpic_url2_".$i}, ${"ed_textpic_name_".$i}; |
|
54 |
${"textpic_url_".$i} = ${"ed_textpic_url_".$i}; |
${"textpic_url_".$i} = ${"ed_textpic_url_".$i}; |
55 |
${"textpic_url2_".$i} = ${"ed_textpic_url2_".$i}; |
${"textpic_url2_".$i} = ${"ed_textpic_url2_".$i}; |
56 |
${"textpic_name_".$i} = ${"ed_textpic_name_".$i}; |
${"textpic_name_".$i} = urldecode(${"ed_textpic_name_".$i}); |
57 |
|
# Fix for M$IE |
58 |
if (${"textpic_url_".$i} == "none") ${"textpic_url_".$i} = ""; |
if (${"textpic_url_".$i} == "none") ${"textpic_url_".$i} = ""; |
59 |
$i++; |
$i++; |
60 |
} |
} |
61 |
|
// ----- |
62 |
|
$categories = array(); |
63 |
|
$sql = "SELECT cat_id, text FROM news_categories ORDER BY text"; |
64 |
|
sql($sql); |
65 |
|
$sth = $dbh->prepare($sql); |
66 |
|
if (!$sth) error("Cannot prepare query: \"$sql\""); |
67 |
|
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
68 |
|
while ($row = $sth->fetchrow_array()) array_push($categories, |
69 |
|
array("id" => $row[0], "txt" => $row[1])); |
70 |
|
$sth->finish(); |
71 |
|
usort($categories, "my_cmp"); |
72 |
|
// ----- |
73 |
|
$specs = array(); |
74 |
|
$sql = "SELECT spec_id, opis FROM specijalizacije WHERE (spec_id != 0) AND (NOT link)"; |
75 |
|
sql($sql); |
76 |
|
$sth = $dbh->prepare($sql); |
77 |
|
if (!$sth) error("Cannot prepare query: \"$sql\""); |
78 |
|
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
79 |
|
while ($row = $sth->fetchrow_array()) array_push($specs, array("id" => $row[0], "txt" => $row[1])); |
80 |
|
$sth->finish(); |
81 |
|
usort($specs, "my_cmp"); |
82 |
|
// ----- |
83 |
|
$levels = array(); |
84 |
|
$sql = "SELECT level_id, class, name FROM par_levels ORDER BY name"; |
85 |
|
sql($sql); |
86 |
|
$sth = $dbh->prepare($sql); |
87 |
|
if (!$sth) error("Cannot prepare query: \"$sql\""); |
88 |
|
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
89 |
|
while ($row = $sth->fetchrow_array()) array_push($levels, array("id" => $row[0], "class" => $row[1], "name" => $row[2])); |
90 |
|
$sth->finish(); |
91 |
|
// ----- |
92 |
global $cancel, $save; |
global $cancel, $save; |
93 |
if ($cancel || $save) { |
if ($cancel || $save) { |
94 |
if ($save) { |
if ($save) { |
95 |
// Move temp pics & save article. |
// Move temp pics & save article. |
96 |
if (ereg("^$phptmp", $titlepic_url2) && $ed_id > 0) { |
if (ereg("$phptmp", $titlepic_url2) && $ed_id > 0 && file_exists("$syspicdir/$titlepic_url2")) { |
97 |
$sql = "SELECT title_pic FROM news WHERE (news_id = $ed_id)"; |
$sql = "SELECT title_pic FROM news WHERE (news_id = $ed_id)"; |
98 |
sql($sql); |
sql($sql); |
99 |
$sth = $dbh->prepare($sql); |
$sth = $dbh->prepare($sql); |
104 |
$row = array_shift($row); |
$row = array_shift($row); |
105 |
if ($row) MyDelete($syspicdir."/".$row); |
if ($row) MyDelete($syspicdir."/".$row); |
106 |
} |
} |
107 |
|
if (ereg("$phptmp", $author_url2) && $ed_id > 0 && file_exists("$sysaupicdir/$author_url2")) { |
108 |
|
$sql = "SELECT author_pic FROM news WHERE (news_id = $ed_id)"; |
109 |
|
sql($sql); |
110 |
|
$sth = $dbh->prepare($sql); |
111 |
|
if (!$sth) error("Cannot prepare query: \"$sql\""); |
112 |
|
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
113 |
|
$row = $sth->fetchrow_array(); |
114 |
|
$sth->finish(); |
115 |
|
$row = array_shift($row); |
116 |
|
if ($row) MyDelete($sysaupicdir."/".$row); |
117 |
|
} |
118 |
global $ed_title, $ed_lead, $ed_titlepic_alt, |
global $ed_title, $ed_lead, $ed_titlepic_alt, |
119 |
$ed_titlepic_pos, $ed_more, $ed_cat; |
$ed_titlepic_pos, $ed_more, $ed_more_title, |
120 |
|
$ed_cat, $ed_author_alt, $ed_author_info, |
121 |
|
$ed_author_ime; |
122 |
$ed_title = MyQuote($ed_title); |
$ed_title = MyQuote($ed_title); |
123 |
$ed_lead = MyQuote($ed_lead); |
$ed_lead = MyQuote($ed_lead); |
124 |
$ed_titlepic_nm = MyQuote(basename($titlepic_name)); |
$ed_author_nm = urldecode(MyQuote(basename($author_name))); |
125 |
|
$ed_author_alt = MyQuote($ed_author_alt); |
126 |
|
$ed_author_ime = MyQuote($ed_author_ime); |
127 |
|
$ed_author_info = MyQuote($ed_author_info); |
128 |
|
$ed_titlepic_nm = urldecode(MyQuote(basename($titlepic_name))); |
129 |
$ed_titlepic_alt = MyQuote($ed_titlepic_alt); |
$ed_titlepic_alt = MyQuote($ed_titlepic_alt); |
130 |
$ed_more = MyQuote($ed_more); |
$ed_more = MyQuote($ed_more); |
131 |
|
$ed_more_title = MyQuote($ed_more_title); |
132 |
if (!$ed_titlepic_pos) $ed_titlepic_pos = 0; |
if (!$ed_titlepic_pos) $ed_titlepic_pos = 0; |
133 |
if ($ed_id > 0) { |
if ($ed_id > 0) { |
134 |
$sql = "UPDATE news SET category = '$ed_cat', title = $ed_title, lead = $ed_lead, title_pic = $ed_titlepic_nm, title_alt = $ed_titlepic_alt, title_pos = $ed_titlepic_pos, url = $ed_more, date = CURRENT_TIMESTAMP WHERE (news_id = $ed_id)"; |
$sql = "UPDATE news SET category = '$ed_cat', title = $ed_title, lead = $ed_lead, title_pic = $ed_titlepic_nm, title_alt = $ed_titlepic_alt, title_pos = $ed_titlepic_pos, author_pic = $ed_author_nm, author_alt = $ed_author_alt, author_info = $ed_author_info, author_name = $ed_author_ime, url = $ed_more, url_title = $ed_more_title, plivamed = ".($isMed?"true":"false").", ord = 0, d_change = NOW() WHERE (news_id = $ed_id)"; |
135 |
sql($sql); |
sql($sql); |
136 |
$dbh->dbh_do($sql); |
$dbh->dbh_do($sql); |
137 |
} else { |
} else { |
138 |
$sql = "INSERT INTO news (category, title, lead, title_pic, title_alt, title_pos, url, date) VALUES ('$ed_cat', $ed_title, $ed_lead, $ed_titlepic_nm, $ed_titlepic_alt, $ed_titlepic_pos, $ed_more, CURRENT_TIMESTAMP)"; |
$sql = "INSERT INTO news (category, title, lead, title_pic, title_alt, title_pos, author_pic, author_alt, author_info, author_name, url, url_title, plivamed, d_orig, d_change) VALUES ('$ed_cat', $ed_title, $ed_lead, $ed_titlepic_nm, $ed_titlepic_alt, $ed_titlepic_pos, $ed_author_nm, $ed_author_alt, $ed_author_info, $ed_author_ime, $ed_more, $ed_more_title, ".($isMed?"true":"false").", NOW(), NOW())"; |
139 |
sql($sql); |
sql($sql); |
140 |
$dbh->dbh_do($sql); |
$dbh->dbh_do($sql); |
141 |
$sql = "SELECT news_id FROM news WHERE (title = $ed_title)"; |
$sql = "SELECT currval('news_news_id_seq')::text"; |
142 |
sql($sql); |
sql($sql); |
143 |
$sth = $dbh->prepare($sql); |
$sth = $dbh->prepare($sql); |
144 |
if (!$sth) error("Cannot prepare query: \"$sql\""); |
if (!$sth) error("Cannot prepare query: \"$sql\""); |
150 |
if (is_array($row)) $row = array_shift($row); |
if (is_array($row)) $row = array_shift($row); |
151 |
if ($row) $ed_id = $row; |
if ($row) $ed_id = $row; |
152 |
} |
} |
153 |
if ($titlepic_url2) MyMove("$syspicdir/$titlepic_url2", "$syspicdir/$titlepic_name"); |
if ($titlepic_url2) MyMove("$syspicdir/$titlepic_url2", urldecode("$syspicdir/$titlepic_name")); |
154 |
|
if ($author_url2) MyMove("$sysaupicdir/$author_url2", urldecode("$sysaupicdir/$author_name")); |
155 |
$i = 1; |
$i = 1; |
156 |
|
$parents = array(); |
157 |
|
$last_level = 0; |
158 |
|
$last_id = 0; |
159 |
while ($ed_id > 0 && isset(${"ed_text_id_".$i})) { |
while ($ed_id > 0 && isset(${"ed_text_id_".$i})) { |
160 |
global ${"ed_text_title_".$i}, ${"ed_text_".$i}, |
global ${"ed_text_title_".$i}, ${"ed_text_".$i}, |
161 |
${"ed_textpic_alt_".$i}, ${"ed_textpic_pos_".$i}, |
${"ed_textpic_alt_".$i}, ${"ed_textpic_pos_".$i}, |
162 |
${"ed_text_level_".$i}; |
${"ed_text_level_".$i}, ${"ed_hl_".$i}, |
163 |
list($id, $tit, $txt, $pic, $orig, $alt, $pos, $del, $lev) = array( |
${"ed_textpic_exp_".$i}; |
164 |
|
list($id, $tit, $txt, $pic, $orig, $alt, $pos, $del, $lev, $hl, $exp) = array( |
165 |
${"ed_text_id_".$i}, ${"ed_text_title_".$i}, |
${"ed_text_id_".$i}, ${"ed_text_title_".$i}, |
166 |
${"ed_text_".$i}, ${"textpic_url2_".$i}, ${"textpic_name_".$i}, |
${"ed_text_".$i}, ${"textpic_url2_".$i}, ${"textpic_name_".$i}, |
167 |
${"ed_textpic_alt_".$i}, ${"ed_textpic_pos_".$i}, |
${"ed_textpic_alt_".$i}, ${"ed_textpic_pos_".$i}, |
168 |
${"del_".$i}, ${"ed_text_level_".$i}); |
${"del_".$i}, ${"ed_text_level_".$i}, ${"ed_hl_".$i}, |
169 |
|
${"ed_textpic_exp_".$i}); |
170 |
|
if ($lev != $last_level) { |
171 |
|
if ($last_level) { |
172 |
|
if ($last_level < $lev) array_push($parents, $id); |
173 |
|
if ($last_level > $lev && count($parents) > 0) array_pop($parents); |
174 |
|
} |
175 |
|
$last_level = $lev; |
176 |
|
$parent = $parents[0]; |
177 |
|
if ($parent < 0) $parent = $last_id; |
178 |
|
} |
179 |
$tit = MyQuote($tit); |
$tit = MyQuote($tit); |
180 |
$txt = MyQuote($txt); |
$txt = MyQuote($txt); |
181 |
|
$exp = MyQuote($exp); |
182 |
|
$hl = MyQuote($hl); |
183 |
$orig = basename($orig); |
$orig = basename($orig); |
184 |
$org = MyQuote($orig); |
$org = MyQuote($orig); |
185 |
$alt = MyQuote($alt); |
$alt = MyQuote($alt); |
198 |
$sth->finish(); |
$sth->finish(); |
199 |
} |
} |
200 |
if ($del) $sql = "DELETE FROM paragraphs WHERE (news_id = $ed_id) AND (paragraph_id = $id)"; |
if ($del) $sql = "DELETE FROM paragraphs WHERE (news_id = $ed_id) AND (paragraph_id = $id)"; |
201 |
else $sql = "UPDATE paragraphs SET title = $tit, level = $lev, text = $txt, pic = $org, alt = $alt, pos = $pos WHERE (news_id = $ed_id) AND (paragraph_id = $id)"; |
else $sql = "UPDATE paragraphs SET title = $tit, level = $lev, text = $txt, hl = $hl, pic = $org, alt = $alt, pos = $pos, pic_title = $exp WHERE (news_id = $ed_id) AND (paragraph_id = $id)"; |
202 |
sql($sql); |
sql($sql); |
203 |
$dbh->dbh_do($sql); |
$dbh->dbh_do($sql); |
204 |
} else if (!$del) { |
} else if (!$del) { |
205 |
$sql = "INSERT INTO paragraphs (news_id, title, level, text, pic, alt, pos) VALUES ($ed_id, $tit, $lev, $txt, $org, $alt, $pos)"; |
$sql = "INSERT INTO paragraphs (news_id, title, level, text, pic, alt, pos, hl, pic_title) VALUES ($ed_id, $tit, $lev, $txt, $org, $alt, $pos, $hl, $exp)"; |
206 |
sql($sql); |
sql($sql); |
207 |
$dbh->dbh_do($sql); |
$dbh->dbh_do($sql); |
208 |
$sql = "SELECT paragraph_id FROM paragraphs WHERE (text = $txt)"; |
$sql = "SELECT currval('paragraphs_paragraph_id_seq')::text"; |
209 |
sql($sql); |
sql($sql); |
210 |
$sth = $dbh->prepare($sql); |
$sth = $dbh->prepare($sql); |
211 |
if (!$sth) error("Cannot prepare query: \"$sql\""); |
if (!$sth) error("Cannot prepare query: \"$sql\""); |
212 |
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
213 |
$rows = array(); |
$row = $sth->fetchrow_array(); |
|
while ($row = $sth->fetchrow_array()) array_push($rows, $row); |
|
214 |
$sth->finish(); |
$sth->finish(); |
215 |
$row = array_pop($rows); |
$row = array_shift($row); |
216 |
if (is_array($row)) $row = array_shift($row); |
$last_id = $id = $row; |
|
$id = $row; |
|
217 |
} |
} |
218 |
if ($pic) MyMove("$syspicdir/$pic", "$syspicdir/$orig"); |
if ($pic) MyMove("$syspicdir/$pic", "$syspicdir/$orig"); |
219 |
$i++; |
$i++; |
220 |
} |
} |
221 |
|
if ($ed_id) { |
222 |
|
$sql = "DELETE FROM spec_news WHERE (news_id = $ed_id)"; |
223 |
|
sql($sql); |
224 |
|
$dbh->dbh_do($sql); |
225 |
|
for ($k = 0; $k < count($specs); $k++) { |
226 |
|
$var = "ed_spec_".$specs[$k]["id"]; global $$var; |
227 |
|
if (!$$var) continue; |
228 |
|
$sql = "INSERT INTO spec_news (news_id, spec_id) VALUES ($ed_id, ".$specs[$k]["id"].")"; |
229 |
|
sql($sql); |
230 |
|
$dbh->dbh_do($sql); |
231 |
|
} |
232 |
|
$sql = "DELETE FROM cat_news WHERE (news_id = $ed_id)"; |
233 |
|
sql($sql); |
234 |
|
$dbh->dbh_do($sql); |
235 |
|
for ($k = 0; $k < count($categories); $k++) { |
236 |
|
$var = "ed_cat_".$categories[$k]["id"]; |
237 |
|
global $$var; |
238 |
|
if ($categories[$k]["id"] != $ed_cat && !$$var) continue; |
239 |
|
$sql = "INSERT INTO cat_news (news_id, cat_id) VALUES ($ed_id, '".$categories[$k]["id"]."')"; |
240 |
|
sql($sql); |
241 |
|
$dbh->dbh_do($sql); |
242 |
|
} |
243 |
|
} |
244 |
} else { |
} else { |
245 |
// Delete temp pics. |
// Delete temp pics. |
246 |
if (ereg("^$phptmp", $titlepic_url2)) |
if (ereg("$phptmp", $titlepic_url2)) MyDelete($syspicdir."/".$titlepic_url2); |
247 |
MyDelete($syspicdir."/".$titlepic_url2); |
if (ereg("$phptmp", $author_url2)) MyDelete($sysaupicdir."/".$author_url2); |
248 |
$i = 1; |
$i = 1; |
249 |
while (isset(${"ed_textpic_id_".$i})) { |
while (isset(${"ed_textpic_id_".$i})) { |
250 |
$tmp = ${"textpic_url2_".$i}; |
$tmp = ${"textpic_url2_".$i}; |
251 |
if (ereg("^$phptmp", $tmp)) MyDelete($syspicdir."/".$tmp); |
if (ereg("$phptmp", $tmp)) MyDelete($syspicdir."/".$tmp); |
252 |
$i++; |
$i++; |
253 |
} |
} |
254 |
} |
} |
266 |
if ($size <= 0) continue; |
if ($size <= 0) continue; |
267 |
if (!$name) continue; |
if (!$name) continue; |
268 |
if ($tname == "none") continue; |
if ($tname == "none") continue; |
269 |
|
$name = strtr($name, "¹šðè澞©ŠÐÈÆ®Ž ", "ssdcczzSSDCCZZ_"); |
270 |
$nm = basename($tname); |
$nm = basename($tname); |
271 |
$ext = ereg_replace('^.*(\..+)$', '\1', $name); |
$ext = ereg_replace('^.*(\..+)$', '\1', $name); |
|
move_uploaded_file($tname, $syspicdir."/".$nm.$ext); |
|
272 |
if ($key == "ed_titlepic_url") { |
if ($key == "ed_titlepic_url") { |
273 |
|
move_uploaded_file($tname, $syspicdir."/".$nm.$ext); |
274 |
$titlepic_url = $nm.$ext; |
$titlepic_url = $nm.$ext; |
275 |
$titlepic_name = $name; |
$titlepic_name = $name; |
276 |
$u = $titlepic_url2; |
$u = $titlepic_url2; |
277 |
if (ereg("^$phptmp", $u)) MyDelete($syspicdir."/".$u); |
if (ereg("$phptmp", $u)) MyDelete($syspicdir."/".$u); |
278 |
unset($clear_main, $clr_main); |
unset($clear_main, $clr_main); |
279 |
|
} else if ($key == "ed_author_url") { |
280 |
|
move_uploaded_file($tname, $sysaupicdir."/".$nm.$ext); |
281 |
|
$author_url = $nm.$ext; |
282 |
|
$author_name = $name; |
283 |
|
$u = $author_url2; |
284 |
|
if (ereg("$phptmp", $u)) MyDelete($sysaupicdir."/".$u); |
285 |
|
unset($clear_author, $clr_author); |
286 |
} else if (ereg("^ed_textpic_url_([1-9][0-9]*)$", $key, $regs)) { |
} else if (ereg("^ed_textpic_url_([1-9][0-9]*)$", $key, $regs)) { |
287 |
|
move_uploaded_file($tname, $syspicdir."/".$nm.$ext); |
288 |
$n = $regs[1]; |
$n = $regs[1]; |
289 |
${"textpic_url_".$n} = $nm.$ext; |
${"textpic_url_".$n} = $nm.$ext; |
290 |
${"textpic_name_".$n} = $name; |
${"textpic_name_".$n} = $name; |
291 |
$u = ${"textpic_url2_".$n}; |
$u = ${"textpic_url2_".$n}; |
292 |
if (ereg("^$phptmp", $u)) MyDelete($syspicdir."/".$u2); |
if (ereg("$phptmp", $u)) MyDelete($syspicdir."/".$u2); |
293 |
unset(${"clear_".$n}, ${"clr_".$n}); |
unset(${"clear_".$n}, ${"clr_".$n}); |
294 |
} else { |
} else { |
295 |
// [?!?] |
// [?!?] |
297 |
} |
} |
298 |
// ----- |
// ----- |
299 |
$tp = new Smarty(); |
$tp = new Smarty(); |
|
// ----- |
|
|
$categories = array(); |
|
|
$sql = "SELECT cat_id, text FROM news_categories ORDER BY text"; |
|
|
sql($sql); |
|
|
$sth = $dbh->prepare($sql); |
|
|
if (!$sth) error("Cannot prepare query: \"$sql\""); |
|
|
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
|
|
while ($row = $sth->fetchrow_array()) array_push($categories, array("id" => $row[0], "txt" => $row[1])); |
|
|
$sth->finish(); |
|
|
$tp->assign("categories", $categories); |
|
|
// ----- |
|
|
$levels = array(); |
|
|
$sql = "SELECT level_id, class, name FROM par_levels ORDER BY name"; |
|
|
sql($sql); |
|
|
$sth = $dbh->prepare($sql); |
|
|
if (!$sth) error("Cannot prepare query: \"$sql\""); |
|
|
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
|
|
while ($row = $sth->fetchrow_array()) array_push($levels, array("id" => $row[0], "class" => $row[1], "name" => $row[2])); |
|
|
$sth->finish(); |
|
300 |
$tp->assign("levels", $levels); |
$tp->assign("levels", $levels); |
301 |
// ----- |
// ----- |
302 |
global $ed_id, $ed_title, $ed_lead, $ed_titlepic_pos, |
global $ed_id, $ed_title, $ed_lead, $ed_titlepic_pos, |
303 |
$ed_titlepic_alt, $ed_cat, $ed_more; |
$ed_titlepic_alt, $ed_cat, $ed_more, |
304 |
|
$ed_more_title, $ed_author_url, $ed_author_alt, |
305 |
|
$ed_author_info, $ed_author_ime; |
306 |
global $ed_edit, $ed_preview, $preview, $add; |
global $ed_edit, $ed_preview, $preview, $add; |
307 |
if (!$ed_preview) $ed_preview = ($preview ? true : false); |
if (!$ed_preview) $ed_preview = ($preview ? true : false); |
308 |
if ($ed_edit) $ed_preview = false; |
if ($ed_edit) $ed_preview = false; |
310 |
$delete = count(preg_grep('/^ed_delete_[0-9]+$/', |
$delete = count(preg_grep('/^ed_delete_[0-9]+$/', |
311 |
array_keys(array_merge($HTTP_GET_VARS, |
array_keys(array_merge($HTTP_GET_VARS, |
312 |
$HTTP_POST_VARS)))) > 0; |
$HTTP_POST_VARS)))) > 0; |
313 |
$clear = (count(preg_grep('/^ed_clear_(main|[0-9]+)$/', |
global $ed_clear_author; |
314 |
|
$clear = (count(preg_grep('/^ed_clear_(main|author|[0-9]+)$/', |
315 |
array_keys(array_merge($HTTP_GET_VARS, |
array_keys(array_merge($HTTP_GET_VARS, |
316 |
$HTTP_POST_VARS)))) > 0); |
$HTTP_POST_VARS)))) > 0); |
317 |
$ed_pgfs = array(); |
$ed_pgfs = array(); |
318 |
$ed_warning = 0; |
$ed_warning = 0; |
319 |
|
$nspecs = array(); |
320 |
|
$ncats = array(); |
321 |
|
// Transfer data |
322 |
if ($ed_edit || $ed_preview || $add || $delete || $clear) { |
if ($ed_edit || $ed_preview || $add || $delete || $clear) { |
323 |
|
for ($i = 0; $i < count($specs); $i++) { |
324 |
|
$var = "ed_spec_".$specs[$i]["id"]; |
325 |
|
global $$var; |
326 |
|
$nspecs[$specs[$i]["id"]] = $$var ? true : false; |
327 |
|
} |
328 |
|
for ($i = 0; $i < count($categories); $i++) { |
329 |
|
$var = "ed_cat_".$categories[$i]["id"]; |
330 |
|
global $$var; |
331 |
|
$ncats[$categories[$i]["id"]] = $$var ? true : false; |
332 |
|
} |
333 |
global $ed_title, $ed_lead, $ed_titlepic_pos, |
global $ed_title, $ed_lead, $ed_titlepic_pos, |
334 |
$ed_titlepic_alt, $ed_cat, $ed_more; |
$ed_titlepic_alt, $ed_cat, $ed_more, |
335 |
|
$ed_more_title, $ed_author_url, |
336 |
|
$ed_author_alt, $ed_author_info, |
337 |
|
$ed_author_ime; |
338 |
if (!$HTTP_POST_FILES["ed_titlepic_url"]["name"]) $titlepic_url = ""; |
if (!$HTTP_POST_FILES["ed_titlepic_url"]["name"]) $titlepic_url = ""; |
339 |
if (!$titlepic_url) $titlepic_url = $titlepic_url2; |
if (!$titlepic_url) $titlepic_url = $titlepic_url2; |
340 |
if (!$titlepic_url && !($clear_main || $clr_main)) |
if (!$titlepic_url && !($clear_main || $clr_main)) $titlepic_url = $art["pic_url"]; |
341 |
$titlepic_url = $art["pic_url"]; |
if (!$author_url && !($clear_author || $clr_author)) $author_url = $art["au_pic"]; |
342 |
list($width, $height) = PicSize($titlepic_url); |
list($width, $height) = PicSize($titlepic_url); |
343 |
|
list($width2, $height2) = PicSize($author_url, $sysaupicdir); |
344 |
global $ed_title_force; |
global $ed_title_force; |
345 |
if ($titlepic_url && !$ed_titlepic_pos && !$ed_title_force) $ed_warning = 2; |
if ($titlepic_url && !$ed_titlepic_pos && !$ed_title_force) $ed_warning = 2; |
346 |
$i = 1; |
$i = 1; |
348 |
$id = ${"ed_text_id_".$i}; |
$id = ${"ed_text_id_".$i}; |
349 |
global ${"ed_text_".$i}, ${"ed_text_title_".$i}, |
global ${"ed_text_".$i}, ${"ed_text_title_".$i}, |
350 |
${"ed_text_level_".$i}, ${"ed_textpic_alt_".$i}, |
${"ed_text_level_".$i}, ${"ed_textpic_alt_".$i}, |
351 |
${"ed_textpic_pos_".$i}; |
${"ed_textpic_pos_".$i}, ${"ed_hl_".$i}, |
352 |
|
${"ed_textpic_exp_".$i}; |
353 |
$pic_url = ($HTTP_POST_FILES["ed_textpic_url_".$i]["name"]) ? |
$pic_url = ($HTTP_POST_FILES["ed_textpic_url_".$i]["name"]) ? |
354 |
${"textpic_url_".$i} : ""; |
${"textpic_url_".$i} : ""; |
355 |
if (!$pic_url) $pic_url = ${"textpic_url2_".$i}; |
if (!$pic_url) $pic_url = ${"textpic_url2_".$i}; |
358 |
if ($art["text"][$j]["id"] == $id) $tmp = $art["text"][$j]["pic"]; |
if ($art["text"][$j]["id"] == $id) $tmp = $art["text"][$j]["pic"]; |
359 |
if (!$pic_url && $tmp && !(${"clear_".$i} || ${"clr_".$i})) $pic_url = $tmp; |
if (!$pic_url && $tmp && !(${"clear_".$i} || ${"clr_".$i})) $pic_url = $tmp; |
360 |
$level = ${"ed_text_level_".$i}; |
$level = ${"ed_text_level_".$i}; |
361 |
$class = ""; |
list($w, $h) = PicSize($pic_url); |
|
while (list($key, $val) = each($levels)) |
|
|
if ($val["id"] == $level) $class = $val["class"]; |
|
362 |
array_push($ed_pgfs, array($id, |
array_push($ed_pgfs, array($id, |
363 |
${"ed_text_".$i}, ${"ed_text_title_".$i}, |
${"ed_text_".$i}, ${"ed_text_title_".$i}, |
364 |
$level, $class, $pic_url, ${"textpic_name_".$i}, |
$level, $pic_url, ${"textpic_name_".$i}, |
365 |
${"ed_textpic_alt_".$i}, ${"ed_textpic_pos_".$i}, |
${"ed_textpic_alt_".$i}, ${"ed_textpic_pos_".$i}, |
366 |
false)); |
$w, $h, ${"ed_hl_".$i}, ${"ed_textpic_exp_".$i}, false)); |
367 |
$i++; |
$i++; |
368 |
} |
} |
369 |
} else { |
} else { |
370 |
|
if ($ed_id) { |
371 |
|
$sql = "SELECT spec_id FROM spec_news WHERE (news_id = $ed_id)"; |
372 |
|
sql($sql); |
373 |
|
$sth = $dbh->prepare($sql); |
374 |
|
if (!$sth) error("Cannot prepare query: \"$sql\""); |
375 |
|
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
376 |
|
while ($row = $sth->fetchrow_array()) $nspecs[$row[0]] = true; |
377 |
|
$sth->finish(); |
378 |
|
$sql = "SELECT cat_id FROM cat_news WHERE (news_id = $ed_id)"; |
379 |
|
sql($sql); |
380 |
|
$sth = $dbh->prepare($sql); |
381 |
|
if (!$sth) error("Cannot prepare query: \"$sql\""); |
382 |
|
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
383 |
|
while ($row = $sth->fetchrow_array()) $ncats[$row[0]] = true; |
384 |
|
$sth->finish(); |
385 |
|
} |
386 |
list($ed_title, $ed_lead, $ed_titlepic_pos, $titlepic_url, |
list($ed_title, $ed_lead, $ed_titlepic_pos, $titlepic_url, |
387 |
$titlepic_url2, $titlepic_name, $ed_titlepic_alt, |
$titlepic_url2, $titlepic_name, $ed_titlepic_alt, |
388 |
$ed_cat, $ed_more, $width, $height) = array($art["title"], |
$ed_cat, $ed_more, $ed_more_title, $width, $height, |
389 |
$art["lead"], $art["pic_pos"], $art["pic_url"], |
$author_url, $author_url2, $author_name, |
390 |
$art["pic_url"], $art["pic_url"], $art["pic_alt"], |
$ed_author_alt, $ed_author_info, $width2, $height2, |
391 |
$art["category"], $art["more"], $art["pic_w"], $art["pic_h"]); |
$ed_author_ime) = array($art["title"], $art["lead"], $art["pic_pos"], |
392 |
|
$art["pic_url"], $art["pic_url"], urldecode($art["pic_url"]), |
393 |
|
$art["pic_alt"], $art["category"], $art["more"], |
394 |
|
$art["more_title"], $art["pic_w"], $art["pic_h"], |
395 |
|
$art["au_pic"], $art["au_pic"], urldecode($art["au_pic"]), |
396 |
|
$art["au_alt"], $art["au_info"], $art["au_w"], $art["au_h"], |
397 |
|
$art["au_name"]); |
398 |
while ($art["text"] && list($id, $val) = each($art["text"])) { |
while ($art["text"] && list($id, $val) = each($art["text"])) { |
399 |
list($id, $txt, $title, $lev, $cls, $pic, $alt, $pos, $w, $h) = array( |
array_push($ed_pgfs, array($val["id"], $val["text"], $val["title"], |
400 |
$val["id"], $val["text"], $val["title"], $val["level"], |
$val["level"], urldecode($val["pic"]), |
401 |
$val["class"], $val["pic"], $val["alt"], $val["pos"], |
urldecode($val["pic"]), $val["alt"], $val["pos"], $val["w"], |
402 |
$val["w"], $val["h"]); |
$val["h"], $val["hl"], $val["exp"], false)); |
|
array_push($ed_pgfs, array($id, $txt, $title, $lev, $cls, $pic, $pic, $alt, |
|
|
$pos, $w, $h, false)); |
|
403 |
} |
} |
404 |
$ed_id = $art["id"]; |
$ed_id = $art["id"]; |
405 |
if (!$ed_id) $ed_id = -1; |
if (!$ed_id) $ed_id = -1; |
406 |
} |
} |
407 |
|
$ncats[$ed_cat] = true; |
408 |
|
for ($i = 0; $i < count($specs); $i++) $specs[$i]["check"] = $nspecs[$specs[$i]["id"]]; |
409 |
|
for ($i = 0; $i < count($categories); $i++) $categories[$i]["check"] = $ncats[$categories[$i]["id"]]; |
410 |
|
$tp->assign("specs", $specs); |
411 |
|
$tp->assign("categories", $categories); |
412 |
|
if ($ed_more && !strstr($ed_more, "://")) { |
413 |
|
$pos = strpos($ed_more, "?"); |
414 |
|
if ($pos === false || $pos != 0) $ed_more = "http://".$ed_more; |
415 |
|
} |
416 |
if ($add) { |
if ($add) { |
417 |
global $add_num; |
global $add_num; |
418 |
for ($i = 0; $i < intval($add_num); $i++) |
for ($i = 0; $i < intval($add_num); $i++) |
419 |
array_push($ed_pgfs, array(-1, "", "", -1, "", "", "", "", 0, 0, 0, true)); |
array_push($ed_pgfs, array(-1, "", "", -1, "", "", "", 0, 0, 0, "", "", true)); |
420 |
} |
} |
421 |
$ed_empty = ($ed_title || $ed_lead || $ed_titlepic_pos || $ed_more) ? false : true; |
$ed_empty = ($ed_title || $ed_lead || $ed_titlepic_pos || $ed_more) ? false : true; |
422 |
$ed_text = array(); |
$ed_text = array(); |
424 |
$ed_warnings = ($ed_warning ? true : false); |
$ed_warnings = ($ed_warning ? true : false); |
425 |
$i = 1; |
$i = 1; |
426 |
while (list($key, $val) = each($ed_pgfs)) { |
while (list($key, $val) = each($ed_pgfs)) { |
427 |
list($id, $txt, $tit, $lev, $cls, $pic, $name, $alt, $pos, $w, $h, $new) = $val; |
list($id, $txt, $tit, $lev, $pic, $name, $alt, $pos, $w, $h, $hl, $exp, $new) = $val; |
428 |
$del = ((${"delete_".$i} || ${"del_".$i}) ? true : false); |
$del = ((${"delete_".$i} || ${"del_".$i}) ? true : false); |
429 |
array_push($ed_records, array("val" => $del, "id" => $id)); |
array_push($ed_records, array("val" => $del, "id" => $id)); |
430 |
if ($del) { $i++; continue; } |
if ($del) { $i++; continue; } |
431 |
$picurl = ${"textpic_url_".$id}; |
$picurl = ${"textpic_url_".$id}; |
432 |
if (!$picurl) $picurl = $pic; |
if (!$picurl) $picurl = $pic; |
433 |
$class = ""; |
$class = ""; |
434 |
while (list($key, $val) = each($levels)) |
reset($levels); |
435 |
if ($val["id"] == $lev) $class = $val["class"]; |
while (list($k, $v) = each($levels)) if ($v["id"] == $lev) $class = $v["class"]; |
436 |
if ((${"clear_".$i} || ${"clr_".$i}) && $ed_preview && (${"textpic_name_".$i} != ${"textpic_url2_".$i})) { |
if ((${"clear_".$i} || ${"clr_".$i}) && $ed_preview && (${"textpic_name_".$i} != ${"textpic_url2_".$i})) { |
437 |
$tmp = ${"textpic_url2_".$i}; |
$tmp = ${"textpic_url2_".$i}; |
438 |
if (ereg("^$phptmp", $tmp)) MyDelete($syspicdir."/".$tmp); |
if (ereg("$phptmp", $tmp)) MyDelete($syspicdir."/".$tmp); |
439 |
$picurl = ${"textpic_url_".$i} = ${"textpic_url2_".$i} = $name = ""; |
$picurl = ${"textpic_url_".$i} = ${"textpic_url2_".$i} = $name = ""; |
440 |
} |
} |
441 |
if (!$name) $name = $picurl; |
if (!$name) $name = $picurl; |
442 |
$txt = MyEscape($txt); |
$txt = MyEscape(convert_html($txt), false); |
443 |
$txt2 = ParseNewline($txt); |
$txt2 = ParseNewline($txt, true); |
444 |
|
$txt3 = str_replace("&", "&", $txt); |
445 |
|
$txt3 = str_replace("\"", """, $txt3); |
446 |
|
$txt3 = str_replace("<", "<", $txt3); |
447 |
|
$txt3 = str_replace(">", ">", $txt3); |
448 |
|
$hl = MyEscape(convert_html($hl), false); |
449 |
|
$hl2 = ParseNewline($hl, true); |
450 |
|
if ($hl2) $hl2 = GetHighlight($hl2); |
451 |
|
$hl3 = str_replace("&", "&", $hl); |
452 |
|
$hl3 = str_replace("\"", """, $hl3); |
453 |
|
$hl3 = str_replace("<", "<", $hl3); |
454 |
|
$hl3 = str_replace(">", ">", $hl3); |
455 |
global ${"ed_text_force_".$i}; |
global ${"ed_text_force_".$i}; |
456 |
$force = ${"ed_text_force_".$i}; |
$force = ${"ed_text_force_".$i}; |
457 |
$empty = (($ed_preview && !$txt && !$pos && !$new) ? true : false); |
$empty = (($ed_preview && !$txt && !$pos && !$new) ? true : false); |
465 |
"n" => $i, |
"n" => $i, |
466 |
"txt" => $txt2, |
"txt" => $txt2, |
467 |
"txt2" => $txt, |
"txt2" => $txt, |
468 |
"title" => MyEscape($tit), |
"txt3" => $txt3, |
469 |
|
"hl" => $hl2, |
470 |
|
"hl2" => $hl, |
471 |
|
"hl3" => $hl3, |
472 |
|
"title" => MyEscape(convert_html($tit)), |
473 |
"level" => $lev, |
"level" => $lev, |
474 |
"class" => MyEscape($class), |
"class" => MyEscape(convert_html($class)), |
475 |
"url" => MyEscape($picurl), |
"url" => MyEscape(convert_html($picurl)), |
476 |
"name" => MyEscape($name), |
"name" => MyEscape(convert_html($name)), |
477 |
"alt" => MyEscape($alt), |
"alt" => MyEscape(convert_html($alt)), |
478 |
"width" => $w, |
"w" => $w, |
479 |
"height" => $h, |
"h" => $h, |
480 |
"pos" => $pos, |
"pos" => $pos, |
481 |
|
"exp" => MyEscape(convert_html($exp)), |
482 |
"warning" => $warning, |
"warning" => $warning, |
483 |
"clr" => (${"clear_".$i} || ${"clr_".$i} || !$picurl) ? true : false |
"clr" => (${"clear_".$i} || ${"clr_".$i} || !$picurl) ? true : false |
484 |
)); |
)); |
489 |
$tp->assign("ed_cat", $ed_cat); |
$tp->assign("ed_cat", $ed_cat); |
490 |
$tp->assign("ed_preview", $ed_preview); |
$tp->assign("ed_preview", $ed_preview); |
491 |
$tp->assign("ed_trigger", $trigger); |
$tp->assign("ed_trigger", $trigger); |
492 |
$tp->assign("ed_title", MyEscape($ed_title)); |
$tp->assign("ed_title", MyEscape(convert_html($ed_title))); |
493 |
$tp->assign("ed_lead", MyEscape($ed_lead)); |
$tp->assign("ed_lead", MyEscape(convert_html($ed_lead))); |
494 |
$tp->assign("ed_titlepic_pos", $ed_titlepic_pos); |
$tp->assign("ed_titlepic_pos", $ed_titlepic_pos); |
495 |
$tp->assign("ed_titlepic_url", MyEscape($titlepic_url)); |
$tp->assign("ed_titlepic_url", MyEscape(convert_html($titlepic_url))); |
496 |
$tp->assign("ed_titlepic_url2", MyEscape($titlepic_url2)); |
$tp->assign("ed_titlepic_url2", MyEscape(convert_html($titlepic_url2))); |
497 |
$tp->assign("ed_titlepic_name", MyEscape($titlepic_name)); |
$tp->assign("ed_titlepic_name", MyEscape(convert_html($titlepic_name))); |
498 |
$tp->assign("ed_titlepic_alt", MyEscape($ed_titlepic_alt)); |
$tp->assign("ed_titlepic_alt", MyEscape(convert_html($ed_titlepic_alt))); |
499 |
$tp->assign("ed_titlepic_width", $width); |
$tp->assign("ed_titlepic_width", $width); |
500 |
$tp->assign("ed_titlepic_height", $height); |
$tp->assign("ed_titlepic_height", $height); |
501 |
|
$tp->assign("ed_author_url", MyEscape(convert_html($author_url))); |
502 |
|
$tp->assign("ed_author_url2", MyEscape(convert_html($author_url2))); |
503 |
|
$tp->assign("ed_author_name", MyEscape(convert_html($author_name))); |
504 |
|
$tp->assign("ed_author_alt", MyEscape(convert_html($ed_author_alt))); |
505 |
|
$tp->assign("ed_author_info", MyEscape(convert_html($ed_author_info))); |
506 |
|
$tp->assign("ed_author_ime", MyEscape(convert_html($ed_author_ime))); |
507 |
|
$tp->assign("ed_author_width", $width2); |
508 |
|
$tp->assign("ed_author_height", $height2); |
509 |
$tp->assign("ed_more", MyEscape($ed_more)); |
$tp->assign("ed_more", MyEscape($ed_more)); |
510 |
|
$tp->assign("ed_more_new", strstr($ed_more, "://") ? true : false); |
511 |
|
$tp->assign("ed_more_title", MyEscape($ed_more_title)); |
512 |
$tp->assign("ed_clr_main", ($clear_main || $clr_main || !$titlepic_url) ? true : false); |
$tp->assign("ed_clr_main", ($clear_main || $clr_main || !$titlepic_url) ? true : false); |
513 |
|
$tp->assign("ed_clr_author", ($clear_author || $clr_author || !$author_url) ? true : false); |
514 |
$tp->assign("ed_text", $ed_text); |
$tp->assign("ed_text", $ed_text); |
515 |
$tp->assign("ed_empty", $ed_empty); |
$tp->assign("ed_empty", $ed_empty); |
516 |
$tp->assign("ed_warning", $ed_warning); |
$tp->assign("ed_warning", $ed_warning); |
517 |
$tp->assign("ed_warnings", $ed_warnings); |
$tp->assign("ed_warnings", $ed_warnings); |
518 |
$tp->assign("ed_records", $ed_records); |
$tp->assign("ed_records", $ed_records); |
519 |
$tp->assign("newspicdir", "$picdir/"); |
$tp->assign("newspicdir", "$picdir/"); |
520 |
|
$tp->assign("aupicdir", "$aupicdir/"); |
521 |
|
$tp->assign("vijest", $isVijest ? true : false); |
522 |
|
if ($ed_preview) { |
523 |
|
include_once("author.php"); |
524 |
|
$tp->assign("AUTHOR", GetAuthor(MyEscape(convert_html($author_url)), |
525 |
|
MyEscape(convert_html($ed_author_alt)), |
526 |
|
MyEscape(convert_html($ed_author_info)), |
527 |
|
$width2, $height2)); |
528 |
|
} |
529 |
|
$tp->assign("med", $isMed ? true : false); |
530 |
$params = array(); |
$params = array(); |
531 |
if ($section) array_push($params, "section=$section"); |
if ($section) array_push($params, "section=$section"); |
532 |
|
if ($section_menu) array_push($params, "section_menu=$section_menu"); |
533 |
|
if ($section_menu2) array_push($params, "section_menu2=$section_menu2"); |
534 |
|
if ($spec) array_push($params, "spec=$spec"); |
535 |
if ($ed_id) array_push($params, "ed_id=$ed_id"); |
if ($ed_id) array_push($params, "ed_id=$ed_id"); |
536 |
if ($ed_preview) array_push($params, "ed_preview=$ed_preview"); |
if ($ed_preview) array_push($params, "ed_preview=$ed_preview"); |
537 |
if ($trigger) array_push($params, "$trigger=1"); |
if ($trigger) array_push($params, "$trigger=1"); |
538 |
global $PHP_SELF; |
$tp->assign("FORM_ACTION", HTMLSpecialChars("?".implode("&", $params))); |
539 |
$tp->assign("FORM_ACTION", $PHP_SELF.HTMLSpecialChars("?".implode("&", $params))); |
if (!$ed_preview) { |
540 |
global $onload; |
global $onload; |
541 |
$onload .= "document.forms[0].elements[0].focus();"; |
$onload .= "document.forms[1].elements[0].focus();"; |
542 |
|
} |
543 |
return $tp->fetch("edit.tpl"); |
return $tp->fetch("edit.tpl"); |
544 |
} |
} |
545 |
?> |
?> |