Beispiel #1
0
                 fclose($fw);
                 $message = nl2br(sprintf($lang['Message']['Success_import3'], '<a href="' . WA_TMPDIR . '/wa_import_report.txt">', '</a>'));
             } else {
                 $message = $lang['Message']['Success_import2'];
             }
         } else {
             $message = $lang['Message']['Success_import'];
         }
         $output->message($message);
     }
     $output->addHiddenField('sessid', $session->session_id);
     $output->set_filenames(array('tool_body' => 'import_body.tpl'));
     $output->assign_vars(array('L_TITLE_IMPORT' => $lang['Title']['import'], 'L_EXPLAIN_IMPORT' => nl2br(sprintf($lang['Explain']['import'], MAX_IMPORT, '<a href="' . WA_ROOTDIR . '/docs/faq.' . $lang['CONTENT_LANG'] . '.html#p3">', '</a>')), 'L_GLUE' => $lang['Char_glue'], 'L_FILE_LOCAL' => $lang['File_local'], 'L_VALID_BUTTON' => $lang['Button']['valid'], 'L_RESET_BUTTON' => $lang['Button']['reset'], 'S_HIDDEN_FIELDS' => $output->getHiddenFields(), 'S_ENCTYPE' => FILE_UPLOADS_ON ? 'multipart/form-data' : 'application/x-www-form-urlencoded'));
     if ($listdata['liste_format'] == FORMAT_MULTIPLE) {
         require WA_ROOTDIR . '/includes/functions.box.php';
         $output->assign_block_vars('format_box', array('L_FORMAT' => $lang['Format_to_import'], 'FORMAT_BOX' => format_box('format')));
     }
     if (FILE_UPLOADS_ON) {
         //
         // L'upload est disponible sur le serveur
         // Affichage du champ file pour importation
         //
         $output->assign_block_vars('upload_file', array('L_FILE_UPLOAD' => $lang['File_upload'], 'L_MAXIMUM_SIZE' => sprintf($lang['Maximum_size'], formateSize(MAX_FILE_SIZE)), 'MAX_FILE_SIZE' => MAX_FILE_SIZE));
     }
     $output->assign_var_from_handle('TOOL_BODY', 'tool_body');
     break;
 case 'ban':
     if (isset($_POST['submit'])) {
         $pattern = !empty($_POST['pattern']) ? trim(str_replace('\\\'', '', $_POST['pattern'])) : '';
         $unban_list_id = !empty($_POST['unban_list_id']) ? array_map('intval', $_POST['unban_list_id']) : array();
         if ($pattern != '') {
Beispiel #2
0
                                    $s_clip = '<img src="../templates/images/icon_clip.png" width="10" height="13" alt="@" title="' . $s_title_clip . '" />';
                                } else {
                                    $s_clip = '&#160;&#160;';
                                }
                                $output->assign_block_vars('logrow', array('TD_CLASS' => !($i % 2) ? 'row1' : 'row2', 'ITEM_CLIP' => $s_clip, 'LOG_SUBJECT' => htmlspecialchars(cut_str($logrow[$i]['log_subject'], 60), ENT_NOQUOTES), 'LOG_DATE' => convert_time($nl_config['date_format'], $logrow[$i]['log_date']), 'U_VIEW' => sessid('./view.php?mode=log&amp;action=view&amp;id=' . $logrow[$i]['log_id'] . $get_string)));
                                if ($display_checkbox) {
                                    $output->assign_block_vars('logrow.delete', array('LOG_ID' => $logrow[$i]['log_id']));
                                }
                            }
                            if ($action == 'view' && is_array($logdata)) {
                                $format = !empty($_POST['format']) ? intval($_POST['format']) : 0;
                                $output->set_filenames(array('iframe_body' => 'iframe_body.tpl'));
                                $output->assign_vars(array('L_SUBJECT' => $lang['Log_subject'], 'L_NUMDEST' => $lang['Log_numdest'], 'L_EXPORT_T' => $lang['Export_nl'], 'L_EXPORT' => $lang['Export'], 'SUBJECT' => htmlspecialchars($logdata['log_subject'], ENT_NOQUOTES), 'S_NUMDEST' => $logdata['log_numdest'], 'S_CODEBASE' => $nl_config['urlsite'] . $nl_config['path'] . 'admin/', 'U_FRAME' => sessid('./view.php?mode=iframe&amp;id=' . $log_id . '&amp;format=' . $format), 'U_EXPORT' => sessid('./view.php?mode=export&amp;id=' . $log_id)));
                                if ($listdata['liste_format'] == FORMAT_MULTIPLE) {
                                    require WA_ROOTDIR . '/includes/functions.box.php';
                                    $output->assign_block_vars('format_box', array('L_FORMAT' => $lang['Format'], 'L_GO_BUTTON' => $lang['Button']['go'], 'FORMAT_BOX' => format_box('format', $format, true)));
                                }
                                $output->files_list($logdata, $format);
                                $output->assign_var_from_handle('IFRAME', 'iframe_body');
                            }
                        } else {
                            $output->assign_block_vars('empty', array('L_EMPTY' => $lang['No_log_sended']));
                        }
                    }
                }
            }
        }
    }
}
$output->pparse('body');
$output->page_footer();
Beispiel #3
0
	function extract_mogi($filename){

		$fh = fopen($filename, 'r');

		seek_to_chunk($fh, 'MOHD');
		fseek($fh, 4, SEEK_CUR);
		$groups = read_int($fh);

		seek_to_chunk($fh, 'MOHD');
		fseek($fh, 0x24, SEEK_CUR);
		$floats = fread($fh, 24);
		$box = unpack('f6', $floats);
		echo "root\t\t: ".format_box($box)."\n";

		seek_to_chunk($fh, 'MOGI');
		for ($i=0; $i<$groups; $i++){

			$flags = read_int($fh);
			$floats = fread($fh, 24);
			$box = unpack('f6', $floats);
			$name = read_int($fh);



			echo "group $i \t: ".format_box($box)."\n";
			#print_r($box);
		}

		#echo "found $groups groups\n";
		#exit;
	}