vieweditattachhistoryswikistopchangessearchhelp

添付ページ



refs → templates (page) → uploadUnlocked

<?doctype?>
<html>
<head>
<title><?name?></title>
<?endHead?></head>
<body<?colorScheme?>>
<?beforeButtons?><?showButtons?><?afterButtons?>
<h2>ファイル添付(アップローダ)</h2>
<form action="<?toAttach?>" method="post" enctype="multipart/form-data">
<table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><?fileStuff?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="転送開始"><br>&nbsp;</td></tr>
<tr><td><input type="radio" name="specific" value="true" checked>&nbsp;&nbsp;ページに添付(ページ以外からアクセス不能)&nbsp;&nbsp;&nbsp;<br>
<input type="radio" name="specific" value="false">&nbsp;&nbsp;Swiki ブックに添付(どのページからもアクセス可能)&nbsp;&nbsp;&nbsp;</td>
<td><input type="radio" name="reference" value="true" checked>&nbsp;&nbsp;ファイルへのリンクをページに追加する<br>
<input type="radio" name="reference" value="false">&nbsp;&nbsp;ファイルへのリンクをページに追加しない</td></tr>
</table>
</form>
<p><font color=gray><tt>*+myUpload.html+*</tt> のようにページソース中に記述すると、その名前の添付ファイルへのリンクになります。ファイル名が '.gif'、'.jpeg'、'.jpg'、'.png' で終わる画像ファイルなら、その画像がページに挿入されます。<font color=red>添付ファイルの名称には全角文字は使用できません。</font>半角で、できれば英字に限る(数字や特に記号は用いない)ようにしてください。<font color=red>一度、アップロードしたファイルは、管理者しか消すことができません。作業の際にはサーバを停止しなければならないのでトラブルのないようにお願いします。</font></font></p><br>
<hr>
<h3>このページのみアクセス可能なファイル</h3>
<?pageAttachments?>
<br>
<hr>
<h3>どのページからもアクセス可能なファイル</h3>
<?bookAttachments?>
<?endBody?></body>
</html>



refs → templates (page) → uploadLocked

<?doctype?>
<html>
<head>
<title><?name?></title>
<?endHead?></head>
<body<?colorScheme?>>
<?beforeButtons?><?showButtons?><?afterButtons?>
<h2>ファイル添付(アップローダ)</h2>
<p><font color=red>書き換えが制限されているため、ソースを書き換えるためにはパスワードが必要です。</font><p>
<form action="<?toAttach?>" method="post" enctype="multipart/form-data">
<table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><input type="password" size=10 name="password"> - 書き換え制限の解除用パスワードを入力&nbsp;<font color=red>必須</font><br>&nbsp;</td></tr>
<tr><td colspan=2><?fileStuff?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="転送開始"><br>&nbsp;</td></tr>
<tr><td><input type="radio" name="specific" value="true" checked>&nbsp;&nbsp;ページに添付(ページ以外からアクセス不能)&nbsp;&nbsp;&nbsp;<br>
<input type="radio" name="specific" value="false">&nbsp;&nbsp;Swiki ブックに添付(どのページからもアクセス可能)&nbsp;&nbsp;&nbsp;</td>
<td><input type="radio" name="reference" value="true" checked>&nbsp;&nbsp;ファイルへのリンクをページに追加する<br>
<input type="radio" name="reference" value="false">&nbsp;&nbsp;ファイルへのリンクをページに追加しない</td></tr>
</table>
</form>
<p><font color=gray><tt>*+myUpload.html+*</tt> のようにページソース中に記述すると、その名前の添付ファイルへのリンクになります。ファイル名が '.gif'、'.jpeg'、'.jpg'、'.png' で終わる画像ファイルなら、その画像がページに挿入されます。<font color=red>添付ファイルの名称には全角文字は使用できません。</font>半角で、できれば英字に限る(数字や特に記号は用いない)ようにしてください。<font color=red>一度、アップロードしたファイルは、管理者しか消すことができません。作業の際にはサーバを停止しなければならないのでトラブルのないようにお願いします。</font></font></p><br>
<hr>
<h3>このページのみアクセス可能なファイル</h3>
<?pageAttachments?>
<br>
<hr>
<h3>どのページからもアクセス可能なファイル</h3>
<?bookAttachments?>
<?endBody?></body>
</html>



refs → actions (page) → pageAttachments

| colorScheme uploads files uploadServerPath return img ref last |
colorScheme _ book modulesAt: 'colorScheme'.
uploads _ book modulesAt: 'uploads'.
(uploads _ uploads directoryNamed: (page id asString) ifAbsent: [nil])
  ifNil: ['添付ファイルはありません。<br>']
  ifNotNil: [
    "Sort the files"
    files _ uploads filesAlphabetically.
    "Check for no files present"
    (files size = 0)
      ifTrue: ['添付ファイルはありません。<br>']
      ifFalse: [
        uploadServerPath _ book settingsAt: 'uploadServerPath'.
        return _ WriteStream on: (String new: 500).
        return
          nextPutAll: '<table border=0 cellpadding=2 cellspacing=0>';
          nextPutAll: String crlf;
          nextPutAll: '<tr><td></td><td><em>ファイル名</em></td><td align=right>&nbsp;&nbsp;<em>サイズ</em></td><td align=right>&nbsp;&nbsp;<em>日付</em></td></tr>';
          nextPutAll: String crlf;
          nextPutAll: '<tr><td colspan=4><hr size=1 noshade></td></tr>';
          nextPutAll: String crlf.
        files do: [:versions |
          last _ versions last.
          img _ colorScheme mime: (last mimeType copyUpTo: $/) alt: versions strictXmlName.
          ref _ uploadServerPath, uploads httpPath, last httpName.
          return
            nextPutAll: '<tr><td><a href="';
            nextPutAll: ref;
            nextPutAll: '">';
            nextPutAll: img;
            nextPutAll: '</a></td><td><a href="';
            nextPutAll: ref;
            nextPutAll: '">';
            nextPutAll: versions strictXmlName;
            nextPutAll: '</a>'.
          "Add History"
          (versions size = 1) ifFalse: [return
            nextPutAll: '&nbsp;(<a href="';
            nextPutAll: ref;
            nextPutAll: '?history=true">r';
            nextPutAll: versions size asString;
            nextPutAll: '</a>)'].
          return
            nextPutAll: '</td><td align=right>&nbsp;&nbsp;';
            nextPutAll: last fileSizeInWords;
            nextPutAll: '</td><td align=right>&nbsp;&nbsp;';
            nextPutAll: (NuSwikiPage printDate: last modificationDate);
            nextPutAll: '</td></tr>';
            nextPutAll: String crlf].
        return
          nextPutAll: '</table>';
          contents]]



refs → actions (book) → bookAttachments

| colorScheme uploads files uploadServerPath return img ref last |
colorScheme _ book modulesAt: 'colorScheme'.
uploads _ book modulesAt: 'uploads'.
"Sort the files Entries"
files _ uploads filesAlphabetically.
"Check for no files present"
(files size = 0)
  ifTrue: ['添付ファイルはありません。<br>']
  ifFalse: [
    uploadServerPath _ book settingsAt: 'uploadServerPath'.
    return _ WriteStream on: (String new: 500).
    return
      nextPutAll: '<table border=0 cellpadding=2 cellspacing=0>';
      nextPutAll: String crlf;
      nextPutAll: '<tr><td></td><td><em>ファイル名</em></td><td align=right>&nbsp;&nbsp;<em>サイズ</em></td><td align=right>&nbsp;&nbsp;<em>日付</em></td></tr>';
      nextPutAll: String crlf;
      nextPutAll: '<tr><td colspan=4><hr size=1 noshade></td></tr>';
      nextPutAll: String crlf.
    files do: [:versions |
      last _ versions last.
      img _ colorScheme mime: (last mimeType copyUpTo: $/) alt: versions strictXmlName.
      ref _ uploadServerPath, last httpName.
      return
        nextPutAll: '<tr><td><a href="';
        nextPutAll: ref;
        nextPutAll: '">';
        nextPutAll: img;
        nextPutAll: '</a></td><td><a href="';
        nextPutAll: ref;
        nextPutAll: '">';
        nextPutAll: versions strictXmlName;
        nextPutAll: '</a>'.
      "Add History"
      (versions size = 1) ifFalse: [return
        nextPutAll: '&nbsp;(<a href="';
        nextPutAll: ref;
        nextPutAll: '?history=true">r';
        nextPutAll: versions size asString;
        nextPutAll: '</a>)'].
      return
        nextPutAll: '</td><td align=right>&nbsp;&nbsp;';
        nextPutAll: last fileSizeInWords;
        nextPutAll: '</td><td align=right>&nbsp;&nbsp;';
        nextPutAll: (NuSwikiPage printDate: last modificationDate);
        nextPutAll: '</td></tr>';
        nextPutAll: String crlf].
    return
      nextPutAll: '</table>';
      contents]


このページを編集 (13239 bytes)


Congratulations! 以下の 1 ページから参照されています。

This page has been visited 2683 times.