4 function addAlbumForm() {
\r
7 if($CONF['URLMode'] == 'pathinfo') $action = 'gallery'; else $action = 'action.php';
\r
10 <h1><?php echo __NPG_FORM_ADDALBUM; ?></h1>
\r
11 <form method="post" action="<?php echo $action; ?>"><div>
\r
12 <input type="hidden" name="action" value="plugin" />
\r
13 <input type="hidden" name="name" value="gallery" />
\r
14 <input type="hidden" name="type" value="addAlbum" />
\r
16 <?php addAlbumFormFields(); ?>
\r
22 function addAlbumFormFields() {
\r
25 <tr><td><label for="atitle"><?php echo __NPG_FORM_ALBUM_TITLE; ?>:</label></td>
\r
26 <td><input type="text" name="title" id="atitle" size="20" /></td></tr>
\r
27 <tr><td><label for="atitle"><?php echo 'public album'; ?>:</label></td>
\r
28 <td><input type="radio" <?php if($data->publicalbum) echo 'checked ';?> name="publicalbum" id="publicalbum_f" value="1" /><?php echo 'yes'; ?>
\r
29 <input type="radio" <?php if(!$data->publicalbum) echo 'checked ';?> name="publicalbum" id="publicalbum_f" value="0" /><?php echo 'no'; ?></td></tr>
\r
30 <tr><td><label for="adesc"><?php echo __NPG_FORM_ALBUM_DESC; ?>:</label></td>
\r
31 <td><input type="text" name="desc" id="adesc" size="80" /></td></tr>
\r
32 <tr><td colspan="2"><input type="submit" value="<?php echo __NPG_FORM_SUBMITALBUM; ?>"></td></tr>
\r
37 function deleteAlbum($id) {
\r
38 global $gmember, $galleryaction;
\r
42 if(!$galleryaction) return false;
\r
43 echo '<h1>'.__NPG_FORM_DELETE_ALBUM.'</h1>';
\r
44 echo __NPG_FORM_REALLY_DELETE_ALBUM.'<br/>';
\r
46 echo '<form><input type="button" value="'.__NPG_FORM_CANCEL.'" onclick="window.location.href=\''.$galleryaction.'\'"/></form>';
\r
48 echo __NPG_FORM_DELETE_OR_MOVE.'<br/>';
\r
50 <form method="post" action="<?php echo $galleryaction; ?>"><div>
\r
51 <input type="hidden" name="action" value="finaldeletealbum" />
\r
52 <input type="hidden" name="id" value="<?php echo $id; ?>" />
\r
54 <select name="deleteoption">
\r
55 <option value="-1" selected><?php echo __NPG_FORM_DELETE_PICTURES; ?>
\r
57 $allowed_albums = $gmember->getallowedalbums();
\r
58 if($allowed_albums) {
\r
60 while($allowed_albums[$j]) {
\r
61 echo '<option value="'.$allowed_albums[$j]->albumid.'">Move pictures to '.$allowed_albums[$j]->albumname;
\r
67 <input type="submit" value="<?php echo __NPG_FORM_DELETE; ?>" />
\r
74 function editAlbumForm($id) {
\r
75 global $gmember,$galleryaction;
\r
77 if(!$galleryaction) {
\r
78 echo 'galleryaction variable not set<br/>';
\r
82 echo '<a href="'.$galleryaction.'">'.__NPG_FORM_RETURN_ADMIN.'</a><br/><br/>';
\r
84 $data = ALBUM::get_data($id);
\r
86 <h3><?php echo __NPG_FORM_MODIFY_ALBUM; ?></h3>
\r
87 <form method="post" action="<?php echo $galleryaction; ?>"><div>
\r
88 <input type="hidden" name="action" value="editalbumtitle" />
\r
89 <input type="hidden" name="id" value="<?php echo $id; ?>" />
\r
92 <label for="atitle"><?php echo __NPG_FORM_ALBUM_TITLE; ?>: </label>
\r
94 <input type="text" name="title" id="atitle" value = "<?php echo stripslashes($data->title); ?>" size="20" />
\r
96 <label for="adesc"><?php echo __NPG_FORM_ALBUM_DESC; ?>: </label>
\r
98 <input type="text" name="desc" id="adesc" value = "<?php echo stripslashes($data->description); ?>" size="60" /><br />
\r
100 <label for="commentsallowed_f"><?php echo __NPG_FORM_COMMENTSALLOWED; ?></label>
\r
102 <input type="radio" <?php if($data->commentsallowed) echo 'checked ';?> name="commentsallowed" id="commentsallowed_f" value="1" /><?php echo __NPG_FORM_YES; ?>
\r
103 <input type="radio" <?php if(!$data->commentsallowed) echo 'checked ';?> name="commentsallowed" id="commentsallowed_f" value="0" /><?php echo __NPG_FORM_NO; ?>
\r
106 <label for="publicalbum_f"><?php echo 'publicalbum'; ?></label>
\r
108 <input type="radio" <?php if($data->publicalbum) echo 'checked ';?> name="publicalbum" id="publicalbum_f" value="1" /><?php echo __NPG_FORM_YES; ?>
\r
109 <input type="radio" <?php if(!$data->publicalbum) echo 'checked ';?> name="publicalbum" id="publicalbum_f" value="0" /><?php echo __NPG_FORM_NO; ?>
\r
111 <label for="thumbnail_f"><?php echo __NPG_FORM_ALBUM_THUMBNAIL; ?></label>
\r
113 <select name="thumbnail" id="thumbnail_f">
\r
115 $pics = ALBUM::get_pictures($id);
\r
118 echo '<option value="'.$pics[$k]->thumb_filename.'" ';
\r
119 if ($pics[$k]->thumb_filename == $data->thumbnail) echo ' selected ';
\r
120 echo '>'.$pics[$k]->title;
\r
126 <br/><input type="submit" value="Submit" />
\r
129 <h3><?php echo __NPG_FORM_CURRENT_ALBUM_TEAM; ?></h3>
\r
130 <form method="post" action="<?php echo $galleryaction; ?>"><div>
\r
131 <input type="hidden" name="action" value="editalbumteam" />
\r
132 <input type="hidden" name="id" value="<?php echo $id; ?>" />
\r
135 <thead><tr><th><?php echo __NPG_FORM_NAME; ?></th><th><?php echo __NPG_FORM_ALBUM_ADMIN; ?></th><th colspan='2'><?php echo __NPG_FORM_ACTIONS; ?></th></thead>
\r
137 <tr onmouseover='focusRow(this);' onmouseout='blurRow(this);'>
\r
138 <td><?php echo $data->name.' ('.__NPG_FORM_OWNER.')'; ?></td>
\r
140 <td colspan='2' ><?php echo __NPG_FORM_NO_OWNER_ACTIONS; ?></td>
\r
143 $team = ALBUM::get_team($id);
\r
147 ?><tr onmouseover='focusRow(this);' onmouseout='blurRow(this);'><?php
\r
148 echo '<td>'.$team[$j]->mname.'</td>';
\r
149 if($team[$j]->tadmin) echo '<td>'.__NPG_FORM_YES.'</td>'; else echo '<td>'.__NPG_FORM_NO.'</td>';
\r
150 echo '<td><a href="'.$galleryaction.'?action=deltmember&mid='.$team[$j]->tmemberid.'&aid='.$id.'">'.__NPG_FORM_DELETE.'</a></td>';
\r
151 echo '<td><a href="'.$galleryaction.'?action=toggleadmin&mid='.$team[$j]->tmemberid.'&aid='.$id.'">'.__NPG_FORM_TOGGLE_ADMIN.'</a></td></tr>';
\r
160 <h3><?php echo __NPG_FORM_ADDTEAMMEMBER; ?></h3>
\r
161 <form method="post" action="<?php echo $galleryaction; ?>"><div>
\r
162 <input type="hidden" name="action" value="addalbumteam" />
\r
163 <input type="hidden" name="id" value="<?php echo $id; ?>" />
\r
166 <td><?php echo __NPG_FORM_CHOOSEMEMBER; ?>:</td>
\r
169 //this query lists the members that are not already part of the team, not the admins(they already have permissions) and are not the owner of the album
\r
170 $result = mysql_query('select mname, mnumber from '.sql_table('member').' left join '.sql_table('plug_gallery_album_team').' on mnumber=tmemberid and talbumid='.intval($id).' where mnumber <> '.intval($data->ownerid).' and madmin=0 and tmemberid is null');
\r
172 $num_rows = mysql_num_rows($result);
\r
174 echo '<select name="tmember">';
\r
175 while($m = mysql_fetch_object($result)) echo '<option value="'.$m->mnumber.'">'.$m->mname;
\r
181 <tr><td><?php echo __NPG_FORM_ADMIN_PRIV; ?> </td>
\r
182 <td><input type="radio" name="admin" value="1" id="admin1" />
\r
183 <label for="admin1"><?php echo __NPG_FORM_YES; ?></label>
\r
184 <input type="radio" name="admin" value="0" checked='checked' id="admin0" />
\r
185 <label for="admin0"><?php echo __NPG_FORM_NO; ?></label></td></tr>
\r
187 <tr><td><?php echo __NPG_FORM_ADDTOTEAM; ?></td>
\r
188 <td><input type='submit' value='<?php echo __NPG_FORM_ADDTOTEAM; ?>' /></td></tr></table>
\r
196 function editPictureForm($id) {
\r
197 global $gmember,$manager;
\r
199 //todo:add delete picture link, add move to different album link
\r
200 $data = PICTURE::get_data($id);
\r
201 if($data->pictureid) {
\r
203 <h1><?php echo __NPG_FORM_EDITPICTURE; ?></h1>
\r
204 <form method="post" action="action.php"><div>
\r
205 <input type="hidden" name="action" value="plugin" />
\r
206 <input type="hidden" name="name" value="gallery" />
\r
207 <input type="hidden" name="type" value="editPicture" />
\r
208 <input type="hidden" name="id" value="<?php echo $id; ?>" />
\r
210 <table><tr><td><?php echo __NPG_FORM_PICTURETITLE; ?></td>
\r
211 <td><input type="text" name="ptitle" value="<?php echo $data->title; ?>" size="40" /></td></tr>
\r
212 <tr><td><?php echo __NPG_FORM_PICTUREDESCRIPTION; ?></td>
\r
213 <td><input type="text" name="pdesc" value="<?php echo $data->description; ?>" size="70" /></td></tr>
\r
214 <tr><td>keywords(seperate with ','): </td>
\r
215 <td><input type="text" name="keywords" value="<?php echo $data->keywords; ?>" size="70" /></td></tr>
\r
219 $allowed_albums = $gmember->getallowedalbums();
\r
220 if($allowed_albums[1]) { //if more than 1 allowed album display Move Album option
\r
221 echo '<tr><td>'.__NPG_FORM_MOVETOALBUM.': </td><td><select name="aid">';
\r
223 while($allowed_albums[$j]) {
\r
224 echo '<option value="'.$allowed_albums[$j]->albumid.'"';
\r
225 if($allowed_albums[$j]->albumid == $data->albumid) echo 'selected';
\r
227 echo $allowed_albums[$j]->albumname;
\r
230 echo '</select></td></tr></table>';
\r
232 $manager->notify('NPgEditPictureFormExtras',array('pictureid'=>$id,'title'=>$data->title,'description'=>$data->description));
\r
235 <br/><input type="submit" value="<?php echo __NPG_FORM_SUBMIT_CHANGES; ?>"></table>
\r
239 else echo __NPG_FORM_NOPICTOEDIT;
\r
243 function deletePictureForm($id) {
\r
244 $data = PICTURE::get_data($id);
\r
245 if($data->pictureid) {
\r
246 echo '<img src="'.$data->thumb_filename.'" /><br/>';
\r
247 echo __NPG_FORM_REALLYDELETE.'<br/>';
\r
248 echo '<form><input type="button" value="'.__NPG_FORM_CANCEL.'" onclick="history.back()"/></form>';
\r
251 echo __NPG_FORM_DELETEPICTURETEXT;
\r
252 echo '<form method="post" action="action.php">';
\r
253 echo '<input type="hidden" name="action" value="plugin" />';
\r
254 echo '<input type="hidden" name="name" value="gallery" />';
\r
255 echo '<input type="hidden" name="type" value="finaldeletepicture" />';
\r
256 echo '<input type="hidden" name="id" value="'.$id.'" />';
\r
257 echo __NPG_FORM_DELETEPROMOTOO;
\r
258 echo __NPG_FORM_YES.':<input type="radio" checked name="delpromo" id="promo" value="yes" />';
\r
259 echo ' '.__NPG_FORM_YES.':<input type="radio" name="delpromo" id="promo" value="no" />';
\r
260 echo '<br/><input type="submit" value="'.__NPG_FORM_DELETE.'"/></form>';
\r
262 else echo __NPG_FORM_NOPICTTODELETE;
\r
265 function addPictureForm($albumid = 0, $num_files = 0) {
\r
266 global $NPG_CONF,$CONF;
\r
269 if($NPG_CONF['batch_add_num']) $num_files = $NPG_CONF['batch_add_num'];
\r
270 else $num_files = 10;
\r
274 <h1><?php echo __NPG_FORM_UPLOADFILEFORM; ?></h1>
\r
275 <form enctype="multipart/form-data" method="post" action="<?php echo $CONF['PluginURL'].'gallery/add_picture.php'; ?>"><div>
\r
276 <input type="hidden" name="type" value="secondstage" />
\r
277 <input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
\r
281 if($albumid) echo '<input type="hidden" name="id" value="'.$albumid.'" />';
\r
283 for($i=0; $i<$num_files; $i++) {
\r
285 echo '<tr><td>'.__NPG_FORM_PICTURELABLE.' '.$j.'</td><td><input type="file" name="uploadpicture'.$i.'"></td></tr>';
\r
289 <input type="submit" value="<?php echo __NPG_FORM_SUBMITFILES; ?>">
\r
294 function addpictureformjupload($albumid = 0, $num_files = 0) {
\r
295 global $NPG_CONF,$CONF;
\r
296 if (!preg_match('/^([a-z0-9_]+|`[^`]+`)$/i',$NPG_CONF['temp_table'])) exit;
\r
297 $exist_temp_table = mysql_query('SELECT 1 FROM '.$NPG_CONF['temp_table'].' LIMIT 0');
\r
298 if ($exist_temp_table) sql_query('drop table '. $NPG_CONF['temp_table']);
\r
304 Author: $Author: mhaller $
\r
306 Id: $Id: JUpload.html,v 1.1 2004/02/05 08:59:40 mhaller Exp $
\r
308 Version: $Revision: 1.1 $
\r
310 Date: $Date: 2004/02/05 08:59:40 $
\r
314 <title>JUpload - multiple file upload with resuming</title>
\r
315 <meta name="Author" content="Mike Haller">
\r
316 <meta name="Publisher" content="Haller Systemservice">
\r
317 <meta name="Copyright" content="Mike Haller">
\r
318 <meta name="Keywords" content="jupload, multiple, java, upload, http, html, applet, embed, object, input, type, file, submit, add, remove, queue, rfc 1867, application/x-www-form-urlencoded, POST METHOD, swing, awt, j2se, transfer, files, requests, webserver, apache, asp, jsp, php4, php5, php, multipart, content-disposition, form-data, boundary, attachment, mime headers, transmission, enctype, remote data, browser, internet explorer, mozilla, opera, fileuploader, batch upload, file selection dialog, resuming, resume, continue">
\r
319 <meta name="Description" content="JUpload is a java applet for uploading multiple files to the webserver using RFC1867 post method. It features a status display showing current transfer rate.">
\r
320 <meta name="Page-topic" content="HTTP file upload with resuming using post or put method featuring https and proxy">
\r
321 <meta name="Audience" content="Advanced">
\r
322 <meta name="Content-language" content="EN">
\r
323 <meta name="Page-type" content="Software-Download">
\r
324 <meta name="Robots" content="INDEX,FOLLOW">
\r
330 code="JUpload.startup"
\r
331 archive="/nucleus/jupload.jar"
\r
334 mayscript="mayscript"
\r
336 alt="JUpload by www.jupload.biz">
\r
337 <!-- Java Plug-In Options -->
\r
338 <param name="progressbar" value="true">
\r
339 <param name="boxmessage" value="Loading JUpload Applet ...">
\r
340 <!-- Target links -->
\r
341 <param name="actionURL" value="/nucleus/nucleus/plugins/gallery/juploadaccept.php">
\r
342 <!PARAM NAME="maxTotalRequestSize" VALUE="4">
\r
343 <!-- <param name="preselectedFiles" value="c:\test.pdf"> -->
\r
344 <!-- IF YOU HAVE PROBLEMS, CHANGE THIS TO TRUE BEFORE CONTACTING SUPPORT -->
\r
345 <param name="debug" value="true">
\r
346 Your browser does not support applets. Or you have disabled applet in your options.
\r
348 To use this applet, please install the newest version of Sun's java. You can get it from <a href="http://www.java.com/">java.com</a>
\r
350 <a href="<?php echo $CONF['PluginURL'] ?>gallery/add_picture.php?type=massupload&id=<?php echo $albumid ?>">Next step
\r
358 function addTempPictureForm($albumid = 0) {
\r
359 global $NPG_CONF, $gmember,$manager,$CONF,$NP_BASE_DIR;
\r
361 $NPG_CONF = getNPGConfig();
\r
362 if (!preg_match('/^([a-z0-9_]+|`[^`]+`)$/i',$NPG_CONF['temp_table'])) exit;
\r
363 $table_name = $NPG_CONF['temp_table'];
\r
365 $promo_allowed = false;
\r
366 if($NPG_CONF['blog_cat'] <> 0) $promo_allowed=true;
\r
367 $NPG_CONF['promo_allowed'] = $promo_allowed;
\r
370 echo '<h1>'.__NPG_FORM_UPLOADFILEFORM.'</h1>';
\r
371 echo '<form method="post" action="'.$CONF['PluginURL'].'gallery/add_picture.php'.'"><div>';
\r
372 echo '<input type="hidden" name="type" value="addpictures" />';
\r
373 echo '<input type="hidden" name="promopost" value="'.$promo_allowed.'" />';
\r
375 $result = mysql_query("select * from $table_name");
\r
376 if($result) $num_rows = mysql_num_rows($result);
\r
381 $setorpromo = $NPG_CONF['setorpromo'];
\r
382 while($row = mysql_fetch_assoc($result) ) {
\r
383 if ( $row['error'] == '') {
\r
384 echo '<input type="hidden" name="tid'.$i.'" value="'. $row['tempid'] .'" />';
\r
385 echo '<input type="hidden" name="filename'.$i.'" value="'. $row['filename'] .'" />';
\r
386 echo '<input type="hidden" name="thumbfilename'.$i.'" value="'. $row['thumbfilename'] .'" />';
\r
387 echo '<input type="hidden" name="intfilename'.$i.'" value="'. $row['intfilename'] .'" />';
\r
389 echo '<tr><td><img src="'.$CONF['IndexURL'].$row['thumbfilename'].'"></td><td>';
\r
390 echo '<table><tr><td>'.__NPG_FORM_TITLE.'</td>';
\r
391 echo '<td><input type="text" name="title'.$i.'" value="'.$row['title'].'"></td></tr>';
\r
392 echo '<tr><td>'.__NPG_FORM_DESC.'</td>';
\r
393 echo '<td><input type="text" name="description'.$i.'" value="'.$row['description'].'"></td></tr>';
\r
394 if($promo_allowed && $setorpromo=='promo') echo '<tr><td>'.__NPG_FORM_PROMOTE.'</td><td> Yes<input type="radio" name="promote'.$i.'" value="yes"> No<input type="radio" checked name="promote'.$i.'" value="no"></td></tr>';
\r
395 if($setorpromo=='sets'){echo '<tr><td>keywords (seperate with ','):</td><td> <input type="text" name="keywords'.$i.'" value=""></td></tr>';}
\r
397 echo '<tr><td>'.__NPG_FORM_ADDTOALBUM.'</td><td><select name="album'.$i.'">';
\r
398 $allowed_albums = $gmember->getallowedalbums();
\r
400 while($allowed_albums[$j]) {
\r
401 echo '<option value="'.$allowed_albums[$j]->albumid.'">'.$allowed_albums[$j]->albumname;
\r
405 else echo '<input type="hidden" name="album'.$i.'" value="'.$albumid.'">';
\r
406 echo '</select></td></tr></table>';
\r
408 $manager->notify('NPgAddPictureFormExtras',array('i'=>$i,'ttid'=>$row['tempid'], 'filename' =>$row['filename'],'thumbfilename'=>$row['thumbfilename'],'intfilename'=>$row['intfilename'],'title'=>$row['title'],'description'=>$row['description'],'albumid'=>$albumid ));
\r
411 else echo '<br>'.$row['filename'].' '.__NPG_FORM_NOADD.': '.$row['error'].'<br/><br/>';
\r
415 else echo __NPG_FORM_NOPICTSTOADD.'<br/>';
\r
416 if($i == 0) echo __NPG_FORM_NOPICTSTOADD.'</td></tr></table><br/></div></form>';
\r
417 else {echo '</td></tr></table><br/>';
\r
418 if($setorpromo=='sets'){
\r
419 echo '<input type="hidden" name="promote0" value="yes">'.
\r
420 'Enter keywords to promote to your blog(serperate with and):<input type="text" name="promokeywords" value=" " />';
\r
422 echo '<input type="submit" value="'.__NPG_FORM_SUBMITFILES.'"></div></form>';
\r