- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / news / headline-edit.php
bloba793ca24a8b7ebf126fd8fc88b10fb44288ec08c
1 <?php
2 error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
3 require('./roots.php');
4 require($root_path.'include/inc_environment_global.php');
5 /**
6 * CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02
7 * GNU General Public License
8 * Copyright 2002,2003,2004,2005 Elpidio Latorilla
9 * elpidio@care2x.org,
11 * See the file "copy_notice.txt" for the licence notice
13 define('LANG_FILE','editor.php');
14 $local_user='ck_editor_user';
15 require_once($root_path.'include/inc_front_chain_lang.php');
17 //gjergji : new calendar
18 require_once ('../../js/jscalendar/calendar.php');
19 $calendar = new DHTML_Calendar('../../js/jscalendar/', $lang, 'calendar-system', true);
20 $calendar->load_files();
21 //end : gjergji
23 /* Check the article number artnum, if none, redirect to article num selector */
24 if(!isset($artopt) || !$artopt) {
25 header('Location:./headline-edit-select-art.php'.URL_REDIRECT_APPEND);
26 exit;
29 /* Set navigation paths for this page*/
30 $breakfile=$root_path.$HTTP_SESSION_VARS['sess_file_break'].URL_APPEND;
31 $returnfile='headline-edit-select-art.php'.URL_APPEND;
33 /* Set the new return file for the suceeding page */
34 //$HTTP_SESSION_VARS['sess_file_return']='headline-edit-select-art.php';
36 $HTTP_SESSION_VARS['sess_file_forward']='headline-read.php';
38 $title= (!empty($title)) ? $title : $HTTP_SESSION_VARS['sess_title'];
40 /* Load the date formatter */
41 require_once($root_path.'include/inc_date_format_functions.php');
43 /* Determine the picture alignment basing on the article number.
44 * You can change here the alignment. Preset are odd number= left, even number= right
46 if(!($artopt%2)) $alignright=true;
47 else $alignright=false;
49 <?php html_rtl($lang); ?>
51 <head>
53 <?php echo setCharSet(); ?>
54 <title><?php echo $title ?></title>
56 <script language="javascript">
57 <!-- Script Begin
59 function showpic(d)
61 if(d.value) document.images.headpic.src=d.value;
64 <?php
65 # Load the javascript editor form checker
66 require_once($root_path.'include/inc_js_editor_chkform.php');
68 # Load the dates js values
69 require($root_path.'include/inc_checkdate_lang.php');
71 <!-- Root path for the html WYSIWYG editor -->
72 var _editor_url="<?php echo $root_path.'js/html_editor/'; ?>";
74 // -->
75 </script>
76 <!-- load html editor scripts -->
77 <script language="javascript" type="text/javascript" src="<?php echo $root_path.'js/html_editor/'; ?>htmlarea.js"></script>
78 <script language="javascript" type="text/javascript" src="<?php echo $root_path.'js/html_editor/'; ?>lang/en.js"></script>
79 <script language="javascript" type="text/javascript" src="<?php echo $root_path.'js/html_editor/'; ?>dialog.js"></script>
80 <style type="text/css">@import url("<?php echo $root_path.'js/html_editor/'; ?>htmlarea.css")</style>
82 <!-- Load validators -->
83 <script language="javascript" src="<?php echo $root_path; ?>js/editor_chkform.js" type="text/javascript"></script>
85 <?php require($root_path.'include/inc_css_a_hilitebu.php'); ?>
87 </head>
89 <body onLoad="HTMLArea.replace('newsbody')">
91 <form ENCTYPE="multipart/form-data" name="selectform" id="selectform" method="post" action="headline-edit-save.php" onSubmit="return chkForm()">
92 <FONT SIZE=6 COLOR="#cc6600">
93 <b><?php echo $title ?></b></FONT>
94 <hr>
95 <table border=0>
96 <tr >
97 <?php if($artopt!=2) : ?>
98 <td valign=top><img <?php echo createLDImgSrc($root_path,'x-blank.gif') ?> id="headpic"><br>
99 </td>
100 <?php endif ?>
101 <td class="submenu" colspan=2><FONT color="#0000cc" size=3><b><?php echo $LDTitleTag ?>:</b><br>
102 <font size=1><?php echo $LDTitleMaxNote ?><br>
103 <input type="text" name="newstitle" size=50 maxlength=255><br>
104 <FONT color="#0000cc" size=3><b><?php echo $LDHeader ?>:</b><br>
105 <font size=1><?php echo $LDHeaderMaxNote ?><br>
106 <!-- <input type="text" name="preface" size=50 maxlength=50><br> -->
108 <textarea name="preface" cols=50 rows=5 wrap="physical" id="preface"></textarea><br>
110 <FONT color="#0000cc" size=3><b><?php echo $LDNews ?>:</b><br>
111 <font size=1>
113 <textarea name="newsbody" cols=50 rows=14 wrap="physical" id="newsbody"></textarea><br>
115 <FONT color="#0000cc" size=2><b><?php echo $LDPicFile ?>:</b><br>
116 <input type="file" name="pic" onChange="showpic(this)" ><br>
117 <input type="button" value="<?php echo $LDPreviewPic ?>" onClick="showpic(document.selectform.pic)"><br>
118 <FONT color="#0000cc" size=2><b><?php echo $LDAuthor ?>:</b><br>
119 <input type="text" name="author" size=30 maxlength=40><br>
120 <FONT color="#0000cc" size=2><b><?php echo $LDPublishDate ?>:</b><br>
121 <?php
122 //gjergji : new calendar
123 echo $calendar->show_calendar($calendar,$date_format,'publishdate');
124 //end gjergji
126 </td>
127 <?php if($alignright) : ?>
128 <td valign=top><img <?php echo createLDImgSrc($root_path,'x-blank.gif','0','absmiddle') ?> id="headpic"><br>
129 </td>
130 <?php endif ?>
131 </tr>
132 <tr>
133 <?php if(!$alignright) : ?>
134 <td align=right >
135 <a href="<?php echo $returnfile ?>"><img <?php echo createLDImgSrc($root_path,'back2.gif','0') ?>></a>
136 &nbsp;
137 </td>
138 <?php endif ?>
139 <td >
140 <?php if($alignright) : ?>
141 <a href="<?php echo $returnfile ?>"><img <?php echo createLDImgSrc($root_path,'back2.gif','0') ?>></a>
142 <?php endif ?>
143 <input type="image" <?php echo createLDImgSrc($root_path,'continue.gif','0') ?>>
144 <!-- <a href="javascript:chkForm(document.selectform)"><img <?php echo createLDImgSrc($root_path,'continue.gif','0') ?>></a> -->
145 </td>
146 <td align=right >
147 <a href="<?php echo $breakfile ?>"><img <?php echo createLDImgSrc($root_path,'cancel.gif','0') ?>></a>
148 </td>
149 <?php if($alignright) : ?>
150 <td align=right >&nbsp;
151 </td>
152 <?php endif ?>
153 </tr>
154 </table>
155 <input type="hidden" name="sid" value="<?php echo $sid ?>">
156 <input type="hidden" name="lang" value="<?php echo $lang ?>">
157 <input type="hidden" name="title" value="<?php echo $title ?>">
158 <input type="hidden" name="artnum" value="<?php echo $artopt ?>">
159 <input type="hidden" name="mode" value="save">
160 <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000">
162 </form>
163 </body>
164 </html>