* */ # Initialization stuff # -------------------- extract($_SERVER); extract($_REQUEST); $bn_action="view"; $bn_action_mode="R"; require ("./init.inc"); # header and footer are to be displayed only in frame mode # --------------------------------------------------------- $header_footer = ($bn_frames==0) ? true : false; # if note to display is not defined then return to the list # ------------------------------------------------------ if (empty($key)) { display_header ("view note", $header_footer); MsgForm (Msg(3), "list.$ext", ""); display_footer ($header_footer); } # read note from database, exit if error # -------------------------------------- $note = $db->getNote ($bn_db, $key); if ($note < 0) { display_header ("view note", $header_footer); MsgForm (Msg(10), "list.$ext", ""); display_footer ($header_footer); } # set all fields as global variables # ---------------------------------- while ( list( $var, $val ) = each( $note)) { if (is_string ($var)) { $$var = $val; } } # Execute before_access program # ----------------------------- if ($bn_before_access) { include "$bn_dir/$bn_before_access"; } # save reply body (before formatting it) # -------------------------------------- if ($bn_view_reply) { $reply_body = strip_url(strip_smileys ($body)); } # Display HTML headers and header include file if any # ---------------------------------------------------- display_header ("view note", $header_footer); # Display message (static HTML file or dynamic) according to the configuration # --------------------------------------------------------------------------- if ($bn_doc_type == "static") { if (!$filename || $filename == "none") { $formated_date = date ($bn_date_format, $unixdate); $body = format_text($body); $doc=addSlashes(stripSlashes($bn_doc_var)); eval ("echo stripSlashes(\"$doc\n\");"); } elseif (file_exists ("$bn_dir_notes/$filename")) { readFile ("$bn_dir_notes/$filename"); } else { MsgForm (Msg(10), "list.$ext", ""); display_footer ($header_footer); } } elseif ($bn_doc_type == "dynamic") { $formated_date = date ($bn_date_format, $unixdate); $body = format_text($body); $doc=addSlashes(stripSlashes($bn_doc_var)); eval ("\$d = stripSlashes(\"$doc\n\");"); if (!empty($pattern)) { $d = eregi_replace ("$pattern", "$pattern", $d); } print $d; } //wyswietl foty. if(strpos($attachment, ',')) { //print "ataszment, L91"; $foty = explode(",", $attachment); $pytanie = "SELECT unixdate FROM 4web_forumcieplucha WHERE attachment = '$attachment'"; $wyk = mysql_query($pytanie) or die('aaaaaaaaaaa'); $rekord = mysql_fetch_row($wyk); print '

'; foreach($foty as $fota) { if($fota != NULL || $fota != '') { print '

'; } } print '
'; } elseif(strlen($attachment) > 0 && $attachment != 'none' ) { //print $attachment; $pytanie = "SELECT unixdate FROM 4web_forumcieplucha WHERE attachment = '$attachment'"; $wyk = mysql_query($pytanie) or die('aaaaaaaaaaa'); $rekord = mysql_fetch_row($wyk); print '

'; print '

'; print '
'; } # Display attachment if any # ------------------------- //print $attachment."attachment L117"; /* if (!empty($attachment) ) { echo "zalacznik"; echo "
"; display_attachment ($key, $attachment, $att_type, $att_size); } */ # Display toolbar (optional) # -------------------------- if (!$bn_no_toolbar): ?>

  " TARGET="" onClick="OpenWindow('','',600,480);"TARGET="main"> "> ">  
\n"; endif; # Display current thread (optional) # --------------------------------- if ($bn_thread && !$bn_no_thread_list) { print "\n"; $here=$key; // display current thread echo "\n
\n"; echo "\n
"; if ($tprev) { $help=msg(77); displayURL ("$WA_SELF?bn=$bn&key=$tprev&first=$first&last=$last&sort=$sort&where=$where", "", " $help", $help); } echo ""; dspMsg(64); echo ""; if ($tnext) { $help=msg(78); displayURL ("$WA_SELF?bn=$bn&key=$tnext&first=$first&last=$last&sort=$sort&where=$where", "", " $help", $help); } echo "
"; $expnd="all"; $ret = $db->getThread ($bn_db, $key, $thread); // display header $l=addSlashes(stripSlashes($bn_view_header)); eval ("echo stripSlashes(\"$l\");"); $ret = $db->getChild ($thread, "view"); // display footer $l=addSlashes(stripSlashes($bn_view_footer)); eval ("echo stripSlashes(\"$l\");"); echo "
"; print "\n"; } # Display form reply if option set # -------------------------------- if ($bn_view_reply) { $bn_action="reply"; $bn_action_mode="W"; print "\n"; // set user's name and e-mail $reply_name = $username; $reply_address = $useraddress; if (!eregi ("^re:", $subject)) $subject = "Re: $subject"; $subject = kill_quotes($subject); if ($reply_body) { if ($reply_name != "") { $quoted_text = $reply_name . $msg[45]. "\n"; } $quoted_text .= quote_text($reply_body); $quoted_text = kill_quotes($quoted_text); $body = ""; } # Displays the FORM # ----------------- $setUserField = true; // Set username and password in form fields $mail_reply = 1; // set default to checked in the form $form_action = "./insert.$ext"; $back_form="view"; $bn_popup=0; # allows user to set a password so that he can later edit/delete his message # -------------------------------------------------------------------------- if ( $bn_modify || $bn_delete ) { $checkPassword = true; } include "$inc_dir/form.$ext"; } # Display footer # -------------- display_footer ($header_footer); ?>