1 |
ravilov |
1.1 |
{literal} |
2 |
|
|
<script type="text/javascript" language="JavaScript"> |
3 |
|
|
<!-- // begin |
4 |
|
|
function Select(e, obj) { |
5 |
|
|
// ... |
6 |
|
|
} |
7 |
|
|
function InsertTags(src, obj, t) { |
8 |
|
|
alert(t + ": not yet implemented."); |
9 |
|
|
src.blur(); |
10 |
|
|
if (!obj) return; |
11 |
|
|
var o = eval('document.forms[0].elements["'+obj+'"]'); |
12 |
|
|
if (!o) return; |
13 |
|
|
o.focus(); |
14 |
|
|
// ... |
15 |
|
|
} |
16 |
|
|
function Bold(src, obj) { InsertTags(src, obj, "B"); } |
17 |
|
|
function Italic(src, obj) { InsertTags(src, obj, "I"); } |
18 |
|
|
function Underline(src, obj) { InsertTags(src, obj, "U"); } |
19 |
|
|
// end --> |
20 |
|
|
</script> |
21 |
|
|
{/literal} |
22 |
|
|
|
23 |
|
|
<form action="{$FORM_ACTION}" method=post enctype="multipart/form-data"> |
24 |
|
|
{if ($ed_preview)} |
25 |
|
|
<table border=1 cellspacing=0 cellpadding=5 width="100%"><tr><td> |
26 |
|
|
{if (! $ed_clr_main && $ed_titlepic_url && ($ed_titlepic_pos == 1 || $ed_titlepic_pos == 2 || $ed_titlepic_pos == 3))} |
27 |
|
|
<p align={if ($ed_titlepic_pos == 1)}left{/if}{if ($ed_titlepic_pos == 2)}center{/if}{if ($ed_titlepic_pos == 3)}right{/if}><img src="{$newspicdir}{$ed_titlepic_url}" border=0 alt="{$ed_titlepic_alt}"{if ($ed_titlepic_width)} width={$ed_titlepic_width}{/if}{if ($ed_titlepic_height)} height={$ed_titlepic_height}{/if}></p> |
28 |
|
|
{/if} |
29 |
|
|
{if (! $ed_clr_main && $ed_titlepic_url && ($ed_titlepic_pos == 4 || $ed_titlepic_pos == 5))} |
30 |
|
|
{if ($ed_titlepic_pos == 4)}<img src="{$newspicdir}{$ed_titlepic_url}" border=0 alt="{$ed_titlepic_alt}"{if ($ed_titlepic_width)} width={$ed_titlepic_width}{/if}{if ($ed_titlepic_height)} height={$ed_titlepic_height}{/if} align=left>{/if} |
31 |
|
|
{if ($ed_titlepic_pos == 5)}<img src="{$newspicdir}{$ed_titlepic_url}" border=0 alt="{$ed_titlepic_alt}"{if ($ed_titlepic_width)} width={$ed_titlepic_width}{/if}{if ($ed_titlepic_height)} height={$ed_titlepic_height}{/if} align=right>{/if} |
32 |
|
|
{/if} |
33 |
|
|
{if ($ed_title)}<span class="{if ($ed_cat == 't')}topictitle{elseif ($ed_cat == 'w')}newsworldtitle{elseif ($ed_cat == 'p')}newsplivatitle{else}maintitle{/if}">{$ed_title}</span><br>{/if} |
34 |
|
|
{if ($ed_lead)}<span class="{if ($ed_cat == 't')}topicsubtitle{elseif ($ed_cat == 'w')}newsworldsubtitle{elseif ($ed_cat == 'p')}newsplivasubtitle{else}mainsubtitle{/if}">{$ed_lead}</span><br> {/if} |
35 |
|
|
{if (! $ed_clr_main && $ed_titlepic_url && ($ed_titlepic_pos == 6 || $ed_titlepic_pos == 7 || $ed_titlepic_pos == 8))} |
36 |
|
|
<p align={if ($ed_titlepic_pos == 6)}left{/if}{if ($ed_titlepic_pos == 7)}center{/if}{if ($ed_titlepic_pos == 8)}right{/if}><img src="{$newspicdir}{$ed_titlepic_url}" border=0 alt="{$ed_titlepic_alt}"{if ($ed_titlepic_width)} width={$ed_titlepic_width}{/if}{if ($ed_titlepic_height)} height={$ed_titlepic_height}{/if}></p> |
37 |
|
|
{/if} |
38 |
|
|
<br> |
39 |
|
|
<input type=hidden name="ed_id" value="{$ed_id}"> |
40 |
|
|
<input type=hidden name="ed_cat" value="{$ed_cat}"> |
41 |
|
|
<input type=hidden name="ed_title" value="{$ed_title}"> |
42 |
|
|
<input type=hidden name="ed_lead" value="{$ed_lead}"> |
43 |
|
|
<input type=hidden name="ed_titlepic_pos" value="{$ed_titlepic_pos}"> |
44 |
|
|
<input type=hidden name="ed_titlepic_url" value="{$ed_titlepic_url}"> |
45 |
|
|
<input type=hidden name="ed_titlepic_url2" value="{$ed_titlepic_url}"> |
46 |
|
|
<input type=hidden name="ed_titlepic_name" value="{$ed_titlepic_name}"> |
47 |
|
|
<input type=hidden name="ed_titlepic_alt" value="{$ed_titlepic_alt}"> |
48 |
|
|
<input type=hidden name="ed_more" value="{$ed_more}"> |
49 |
|
|
<input type=hidden name="ed_clr_main" value="{$ed_clr_main}"> |
50 |
|
|
{if ($ed_trigger)}<input type=hidden name="{$ed_trigger}" value="1">{/if} |
51 |
|
|
{section name=i loop=$ed_text} |
52 |
|
|
{if (! $i/ed_text.clr && $i/ed_text.url && ($i/ed_text.pos == 1 || $i/ed_text.pos == 2 || $i/ed_text.pos == 3))} |
53 |
|
|
<p align={if ($i/ed_text.pos == 1)}left{/if}{if ($i/ed_text.pos == 2)}center{/if}{if ($i/ed_text.pos == 3)}right{/if}><img src="{$newspicdir}{$i/ed_text.url}" border=0 alt="{$i/ed_text.alt}"{if ($i/ed_text.w)} width={$i/ed_text.w}{/if}{if ($i/ed_text.h)} height={$i/ed_text.h}{/if}></p> |
54 |
|
|
{/if} |
55 |
|
|
<p class="ptitle">{if ($i/ed_text.class)}<span class="{$i/ed_text.class}">{/if}{$i/ed_text.title}{if ($i/ed_text.class)}</span>{/if}</p> |
56 |
|
|
<p class="ptext"> |
57 |
|
|
{if (! $i/ed_text.clr && $i/ed_text.url && ($i/ed_text.pos == 4 || $i/ed_text.pos == 5))} |
58 |
|
|
{if ($i/ed_text.pos == 4)}<img src="{$newspicdir}{$i/ed_text.url}" border=0 alt="{$i/ed_text.alt}"{if ($i/ed_text.w)} width={$i/ed_text.w}{/if}{if ($i/ed_text.h)} height={$i/ed_text.h}{/if} align=left>{/if} |
59 |
|
|
{if ($i/ed_text.pos == 5)}<img src="{$newspicdir}{$i/ed_text.url}" border=0 alt="{$i/ed_text.alt}"{if ($i/ed_text.w)} width={$i/ed_text.w}{/if}{if ($i/ed_text.h)} height={$i/ed_text.h}{/if} align=right>{/if} |
60 |
|
|
{/if} |
61 |
|
|
{if ($i/ed_text.txt)}{$i/ed_text.txt}{else} {/if} |
62 |
|
|
</p> |
63 |
|
|
{if (! $i/ed_text.clr && $i/ed_text.url && ($i/ed_text.pos == 6 || $i/ed_text.pos == 7 || $i/ed_text.pos == 8))} |
64 |
|
|
<p align={if ($i/ed_text.pos == 6)}left{/if}{if ($i/ed_text.pos == 7)}center{/if}{if ($i/ed_text.pos == 8)}right{/if}><img src="{$newspicdir}{$i/ed_text.url}" border=0 alt="{$i/ed_text.alt}"{if ($i/ed_text.w)} width={$i/ed_text.w}{/if}{if ($i/ed_text.h)} height={$i/ed_text.h}{/if}></p> |
65 |
|
|
{/if} |
66 |
|
|
<input type=hidden name="ed_text_{$i/ed_text.n}" value="{$i/ed_text.txt2}"> |
67 |
|
|
<input type=hidden name="ed_text_title_{$i/ed_text.n}" value="{$i/ed_text.title}"> |
68 |
|
|
<input type=hidden name="ed_text_level_{$i/ed_text.n}" value="{$i/ed_text.level}"> |
69 |
|
|
<input type=hidden name="ed_textpic_url_{$i/ed_text.n}" value="{$i/ed_text.url}"> |
70 |
|
|
<input type=hidden name="ed_textpic_url2_{$i/ed_text.n}" value="{$i/ed_text.url}"> |
71 |
|
|
<input type=hidden name="ed_textpic_name_{$i/ed_text.n}" value="{$i/ed_text.name}"> |
72 |
|
|
<input type=hidden name="ed_textpic_alt_{$i/ed_text.n}" value="{$i/ed_text.alt}"> |
73 |
|
|
<input type=hidden name="ed_textpic_pos_{$i/ed_text.n}" value="{$i/ed_text.pos}"> |
74 |
|
|
<input type=hidden name="ed_clr_{$i/ed_text.n}" value="{$i/ed_text.clr}"> |
75 |
|
|
{/section} |
76 |
|
|
{if ($ed_more)}<p align=right><small>[ <a href="{$ed_more}" class="more">more info</a> ]</small></p>{/if} |
77 |
|
|
</td></tr> |
78 |
|
|
<tr bgcolor="#E0E0E0"><td align=right><input type=submit name="ed_edit" value="Re-edit"> <input type=submit name=save value="Save"{if ($ed_empty)} disabled{/if}> <input type=submit name=cancel value="Cancel"></td></tr> |
79 |
|
|
</table> |
80 |
|
|
{else} |
81 |
|
|
<table border=1 cellspacing=0 cellpadding=2 width="100%" bgcolor="#E0E0E0"> |
82 |
ravilov |
1.3 |
{if ($ed_warnings)}<tr bgcolor="#C0C0FF"><td style="padding:10px"><span class="note">Some warnings were generated while processing your article. For more information, review the notes marked <span class="warning">red</span> below.<br><br>Click "<i>Preview</i>" below again to ignore warnings and preview the article anyway.</span></td></tr>{/if} |
83 |
ravilov |
1.1 |
<tr><td> |
84 |
|
|
<table border=0 cellspacing=0 cellpadding=3 width="100%"> |
85 |
|
|
<tr><td align=right><b>Title:</b></td><td colspan=3><input type=text onfocus="select();" class="small" size=30 name="ed_title" value="{$ed_title}" style="width:100%"></td></tr> |
86 |
|
|
<tr><td align=right valign=top><b>Lead:</b></td><td colspan=3><textarea name="ed_lead" onfocus="select();" class="small" style="width:100%" cols=35 rows=3 wrap=virtual>{$ed_lead}</textarea></td></tr> |
87 |
|
|
<tr><td align=right valign=middle><b>Category:</b></td><td colspan=3><select name="ed_cat" class="small" style="width:100%">{section name=i loop=$categories}<option value="{$i/categories.id}"{if ($ed_cat == $i/categories.id)} selected{/if}>{$i/categories.txt}</option>{/section}</select></td></tr> |
88 |
|
|
<tr><td align=right valign=top rowspan=2><b>Title picture:</b></td><td rowspan=2 valign=top>{if (! $ed_clr_main)}<img src="{$newspicdir}{$ed_titlepic_url}" alt="{$ed_titlepic_alt}" border=0{if ($ed_titlepic_width)} width={$ed_titlepic_width}{/if}{if ($ed_titlepic_height)} height={$ed_titlepic_height}{/if}><br>({$ed_titlepic_name})<input type=hidden name="ed_titlepic_url2" value="{$ed_titlepic_url}"><input type=hidden name="ed_titlepic_name" value="{$ed_titlepic_name}">{else}<i>no picture</i>{/if}</td><td align=right width="25%"><b>Filename:</b></td><td><input type=file onfocus="select();" name="ed_titlepic_url" size=10 class="small"> <input type=submit name="ed_clear_main" value="Delete" class="small"{if ($ed_clr_main)} disabled{/if}><input type=hidden name="ed_clr_main" value="{$ed_clr_main}"></td></tr><tr><td align=right><b>Alt:</b></td><td><input type=text onfocus="select();" class="small" size=15 name=ed_titlepic_alt value="{$ed_titlepic_alt}"></td></tr> |
89 |
ravilov |
1.2 |
<tr><td align=right valign=top><b>Title picture position:</b></td><td> |
90 |
ravilov |
1.1 |
<table border=0 cellspacing=0 cellpadding=0> |
91 |
|
|
<tr> |
92 |
|
|
<td><input type=radio class="small" name="ed_titlepic_pos" value=1 title="Upper left"{if ($ed_titlepic_pos == 1)} checked{/if}></td> |
93 |
|
|
<td><input type=radio class="small" name="ed_titlepic_pos" value=2 title="Upper center"{if ($ed_titlepic_pos == 2)} checked{/if}></td> |
94 |
|
|
<td><input type=radio class="small" name="ed_titlepic_pos" value=3 title="Upper right"{if ($ed_titlepic_pos == 3)} checked{/if}></td> |
95 |
|
|
</tr> |
96 |
|
|
<tr> |
97 |
|
|
<td><input type=radio class="small" name="ed_titlepic_pos" value=4 title="Inline left"{if ($ed_titlepic_pos == 4)} checked{/if}></td> |
98 |
|
|
<td><input type=radio class="small" name="ed_titlepic_pos" value=0 title="No picture"{if (!$ed_titlepic_pos)} checked{/if}></td> |
99 |
|
|
<td><input type=radio class="small" name="ed_titlepic_pos" value=5 title="Inline right"{if ($ed_titlepic_pos == 5)} checked{/if}></td> |
100 |
|
|
</tr> |
101 |
|
|
<tr> |
102 |
|
|
<td><input type=radio class="small" name="ed_titlepic_pos" value=6 title="Lower left"{if ($ed_titlepic_pos == 6)} checked{/if}></td> |
103 |
|
|
<td><input type=radio class="small" name="ed_titlepic_pos" value=7 title="Lower center"{if ($ed_titlepic_pos == 7)} checked{/if}></td> |
104 |
|
|
<td><input type=radio class="small" name="ed_titlepic_pos" value=8 title="Lower right"{if ($ed_titlepic_pos == 8)} checked{/if}></td> |
105 |
|
|
</tr> |
106 |
|
|
</table></td> |
107 |
ravilov |
1.3 |
<td colspan=2 align=right valign=bottom>{if ($ed_warning)}<span class="warning"><i>WARNING:</i> |
108 |
ravilov |
1.2 |
{if ($ed_warning == 2)}You uploaded a title picture, but have not selected its disposition (the <i>Title picture position</i> field).{/if} |
109 |
ravilov |
1.3 |
</span><input type=hidden name="ed_title_force" value=1>{else} {/if}</td> |
110 |
ravilov |
1.1 |
</tr> |
111 |
|
|
<td align=right><b>URL for more info:</b></td><td colspan=3 align=left><input type=text onfocus="select();" class="small" size=30 name="ed_more" style="width:100%" value="{$ed_more}"></td> |
112 |
|
|
<tr><td align=left colspan=4><br><br><b>Topic text:</b> |
113 |
|
|
<dl><dd> |
114 |
|
|
{section name=i loop=$ed_text} |
115 |
|
|
<hr width="100%" size=2> |
116 |
|
|
<table border=0 cellspacing=0 cellpadding=4 width="90%"> |
117 |
|
|
<tr><td align=left valign=top width="50%" colspan=2><b><i>Paragraph {%i.rownum%}:</i></b></td><td align=right width="50%" colspan=2><input type=submit name="ed_delete_{$i/ed_text.n}" value="Delete this paragraph" class="small"></td></tr> |
118 |
|
|
<tr><td align=right valign=middle>Level:</td><td><select name="ed_text_level_{$i/ed_text.n}" class="small">{section name=j loop=$levels}<option value="{$j/levels.id}"{if ($i/ed_text.level == $j/levels.id)} selected{/if}>{$j/levels.name}</option>{/section}</select></td><td align=right valign=middle>Title:</td><td><input type=text onfocus="select();" class="small" size=20 name="ed_text_title_{$i/ed_text.n}" value="{$i/ed_text.title}" style="width:100%"></td></tr> |
119 |
|
|
<tr><td align=right valign=top>Text:</td><td colspan=3><table border=0 cellspacing=0 cellpadding=1 width="100%"><tr><td rowspan=3 width="100%" align=center><textarea onfocus="select();" onselect="Select(event, 'ed_text_{$i/ed_text.n}');" name="ed_text_{$i/ed_text.n}" id="ed_text_{$i/ed_text.n}" class="small" style="width:100%" cols=35 rows=5 wrap=virtual>{$i/ed_text.txt2}</textarea></td><td><input type=button value="B" title="Bold" class="btn_b" onclick="return Bold(this, 'ed_text_{$i/ed_text.n}');"></td></tr><tr><td><input type=button value="I" title="Italic" class="btn_i" onclick="return Italic(this, 'ed_text_{$i/ed_text.n}');"></td></tr><tr><td><input type=button value="U" title="Underline" class="btn_u" onclick="return Underline(this, 'ed_text_{$i/ed_text.n}');"></td></tr></table></td></tr> |
120 |
|
|
<tr><td align=right valign=top rowspan=2>Paragraph picture:</td><td valign=top rowspan=2>{if (! $i/ed_text.clr)}<img src="{$newspicdir}{$i/ed_text.url}" alt="{$i/ed_text.alt}" border=0{if ($i/ed_text.w)} width={$i/ed_text.w}{/if}{if ($i/ed_text.h)} height={$i/ed_text.h}{/if}><br>({$i/ed_text.name})<input type=hidden name="ed_textpic_url2_{$i/ed_text.n}" value="{$i/ed_text.url}"><input type=hidden name="ed_textpic_name_{$i/ed_text.n}" value="{$i/ed_text.name}">{else}<i>no picture</i>{/if}</td><td align=right>Filename:</td><td><input type=file onfocus="select();" class="small" name="ed_textpic_url_{$i/ed_text.n}" size=10> <input type=submit class="small" name="ed_clear_{$i/ed_text.n}" value="Delete"{if ($i/ed_text.clr)} disabled{/if}><input type=hidden name="ed_clr_{$i/ed_text.n}" value="{$i/ed_text.clr}"></td></tr><tr><td align=right>Alt:</td><td><input type=text class="small" size=15 name="ed_textpic_alt_{$i/ed_text.n}" value="{$i/ed_text.alt}"></td></tr> |
121 |
|
|
<tr><td align=right>Paragraph picture position:</td><td><table border=0 cellspacing=0 cellpadding=0> |
122 |
|
|
<tr> |
123 |
|
|
<td><input type=radio class="small" name="ed_textpic_pos_{$i/ed_text.n}" value=1 title="Upper left"{if ($i/ed_text.pos == 1)} checked{/if}></td> |
124 |
|
|
<td><input type=radio class="small" name="ed_textpic_pos_{$i/ed_text.n}" value=2 title="Upper center"{if ($i/ed_text.pos == 2)} checked{/if}></td> |
125 |
|
|
<td><input type=radio class="small" name="ed_textpic_pos_{$i/ed_text.n}" value=3 title="Upper right"{if ($i/ed_text.pos == 3)} checked{/if}></td> |
126 |
|
|
</tr> |
127 |
|
|
<tr> |
128 |
|
|
<td><input type=radio class="small" name="ed_textpic_pos_{$i/ed_text.n}" value=4 title="Inline left"{if ($i/ed_text.pos == 4)} checked{/if}></td> |
129 |
|
|
<td><input type=radio class="small" name="ed_textpic_pos_{$i/ed_text.n}" value=0 title="No picture"{if (! $i/ed_text.pos)} checked{/if}></td> |
130 |
|
|
<td><input type=radio class="small" name="ed_textpic_pos_{$i/ed_text.n}" value=5 title="Inline right"{if ($i/ed_text.pos == 5)} checked{/if}></td> |
131 |
|
|
</tr> |
132 |
|
|
<tr> |
133 |
|
|
<td><input type=radio class="small" name="ed_textpic_pos_{$i/ed_text.n}" value=6 title="Lower left"{if ($i/ed_text.pos == 6)} checked{/if}></td> |
134 |
|
|
<td><input type=radio class="small" name="ed_textpic_pos_{$i/ed_text.n}" value=7 title="Lower center"{if ($i/ed_text.pos == 7)} checked{/if}></td> |
135 |
|
|
<td><input type=radio class="small" name="ed_textpic_pos_{$i/ed_text.n}" value=8 title="Lower right"{if ($i/ed_text.pos == 8)} checked{/if}></td> |
136 |
|
|
</tr> |
137 |
|
|
</table></td> |
138 |
ravilov |
1.3 |
<td colspan=2 align=right valign=bottom>{if ($i/ed_text.warning)}<span class="warning"><i>WARNING:</i> |
139 |
ravilov |
1.2 |
{if ($i/ed_text.warning == 1)}This paragraph is empty (ie. it has neither text nor picture).{/if} |
140 |
|
|
{if ($i/ed_text.warning == 2)}You uploaded a picture for this paragraph, but have not selected its disposition (the <i>Picture position</i> field).{/if} |
141 |
ravilov |
1.3 |
</span><input type=hidden name="ed_text_force_{$i/ed_text.n}" value=1>{else} {/if}</td> |
142 |
ravilov |
1.1 |
</tr> |
143 |
|
|
</table> |
144 |
|
|
{if (%i.index% >= %i.loop% - 1)}<hr width="100%" size=2>{/if} |
145 |
|
|
{sectionelse} |
146 |
|
|
<i>No paragraphs.</i> |
147 |
|
|
{/section} |
148 |
|
|
</dd></dl> |
149 |
|
|
</td></tr> |
150 |
|
|
<tr><td align=right colspan=4 class="small"><input type=submit name=add value="Append" class="small"> <select name="add_num" class="small"><option value=1>1</option><option value=2>2</option><option value=3>3</option><option value=4>4</option><option value=5>5</option><option value=6>6</option><option value=7>7</option><option value=8>8</option><option value=9>9</option><option value=10>10</option></select> new paragraph(s) <br> </td></tr> |
151 |
|
|
</table></td></tr> |
152 |
|
|
<tr><td align=right valign=bottom width="50%"> |
153 |
|
|
<input type=reset value="Revert"> <input type=submit name=preview value="Preview"> <input type=submit name=cancel value="Cancel"></td></tr> |
154 |
|
|
</table> |
155 |
|
|
{/if} |
156 |
|
|
{section name=i loop=$ed_records} |
157 |
|
|
<input type=hidden name="ed_text_id_{%i.rownum%}" value="{$i/ed_records.id}"> |
158 |
|
|
<input type=hidden name="ed_del_{%i.rownum%}" value="{$i/ed_records.val}"> |
159 |
|
|
{/section} |
160 |
ravilov |
1.3 |
<input type=hidden name="ed_order" value="{$ed_order}"> |
161 |
ravilov |
1.1 |
</form> |