if (isset($_GET['type']) && $_GET['type']=='cancel' && $banana->post->checkcancel()) {
?>
-<p class="<?php echo $css['error']?>">
+<p class="error">
<?php echo _b_('Voulez-vous vraiment annuler ce message ?'); ?>
</p>
<form action="thread.php" method="post">
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+body {
+ font-family:"Trebuchet MS",Verdana,Geneva,Arial,Helvetica,sans-serif;
+ margin:2em 1%;
+ padding:0;
+}
+
+div.bloc { width: 800px; margin-left: auto; margin-right: auto; }
+
+div.foot {
+ border-top: 1px solid #a2c2e1;
+ padding-top: 1em;
+ margin-top: 1em;
+}
+
+a:link, a:visited { color: #f60; background: transparent; }
+a:active, a:hover { color: #369; background: transparent; }
+
+hr { border: none; border-top: 1px dotted #a2c2e1; }
+
+h1 {
+ color: #369;
+ background: inherit;
+ font-size: 200%;
+ text-align: center;
+ margin: 0em;
+ border-bottom: 2px solid #369;
+ padding: 4px;
+ margin: 1em 0em;
+}
+
+table.bicol {
+ border-collapse: collapse;
+ border: 1px solid #a2c2e1;
+ width: 100%;
+}
+
+table.bicol tr.impair { }
+table.bicol tr.pair { color: inherit; background: #eee; }
+
+table.bicol th {
+ color: #369;
+ background: #d6e1ec;
+ padding: 0px 4px;
+}
+
+table.bicol td { padding: 0px 4px; }
+
table.banana_thread tr.new { font-weight: bold; }
-table.banana_thread td.date { text-align: center; }
+table.banana_thread td.date { width: 15%; text-align: center; }
table.banana_thread td.subj { text-align: left; overflow: hidden; }
table.banana_thread td.from { text-align: left; }
/** MESSAGE VIEW **/
+table.banana_msg .hdr { width: 15%; text-align: right; font-weight: bold; padding-right: 1em; }
+
table.banana_msg td.thrd { padding: 0px; }
table.banana_msg table { border: 0px; padding: 0px; margin: 0px; width: 100%; }
$this->lasterrortext = substr($result, 4);
return false;
}
- $result = $this->gline();
- while ($result != ".") {
+ $array = Array();
+ while (($result = $this->gline()) != ".") {
$array[] = $result;
- $result = $this->gline();
}
return $array;
}
function newSpool($group, $disp=0, $since='') {
require_once('include/spool.inc.php');
$this->spool = new BananaSpool($group, $disp, $since);
- if (!$this->spool) { error('nntpspool'); }
}
function newPost($id)
{
if (function_exists('hook_getprofile')) {
$this->profile = hook_getprofile();
- } else {
- session_start();
}
setlocale(LC_ALL, $this->profile['locale']);
$banana = new Banana;
-switch (basename($_SERVER['SCRIPT_NAME'])) {
- case "thread.php":
- if (!isset($_SESSION['bananapostok'])) {
- $_SESSION['bananapostok']=true;
- }
- break;
-
- default:
- $_SESSION['bananapostok']=true;
- break;
-}
-
-if (empty($css)) {
-$css = array(
- 'bananashortcuts' => 'bananashortcuts',
- 'bicol' => 'bicol',
- 'bicoltitre' => 'bicoltitre',
- 'bicolvpadd' => 'bicolvpadd',
- 'pair' => 'pair',
- 'impair' => 'impair',
- 'bouton' => 'bouton',
- 'error' => 'error',
- 'normal' => 'normal',
- 'total' => 'total',
- 'unread' => 'unread',
- 'group' => 'group',
- 'description' => 'description',
- 'date' => 'date',
- 'subject' => 'subject',
- 'from' => 'from',
- 'author' => 'author',
- 'nopadd' => 'nopadd',
- 'overview' => 'overview',
- 'tree' => 'tree'
- );
-}
?>
}
function displayshortcuts($first = -1) {
- global $banana, $css;
+ global $banana;
$sname = basename($_SERVER['SCRIPT_NAME']);
$res = '<div class="banana_scuts">';
}
if (isset($group) && isset($id) && isset($_REQUEST['type']) && ($_REQUEST['type']=='followup')) {
+ $banana->nntp->group($group);
$banana->newPost($id);
$body = '';
if ($banana->post) {
</h1>
<?php
-displayshortcuts();
+echo displayshortcuts();
?>
<form action="thread.php" method="post">
-<table class="<?php echo $css['bicol']?>" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <th colspan="2">
- <?php echo _b_('En-têtes'); ?>
- </th>
- </tr>
- <tr>
- <td class="<?php echo $css['bicoltitre'];?>">
- <?php echo _b_('Nom'); ?>
- </td>
- <td>
- <?php echo htmlentities($banana->profile['name']); ?>
- </td>
- </tr>
- <tr>
- <td class="<?php echo $css['bicoltitre'];?>">
- <?php echo _b_('Sujet'); ?>
- </td>
- <td>
- <input type="text" name="subject" value="<?php if (isset($subject)) echo $subject; ?>" />
- </td>
- </tr>
- <tr>
- <td class="<?php echo $css['bicoltitre'];?>">
- <?php echo _b_('Forums'); ?>
- </td>
- <td>
- <input type="text" name="newsgroups" value="<?php if (isset($target)) echo $target; ?>" />
- </td>
- </tr>
- <tr>
- <td class="<?php echo $css['bicoltitre'];?>">
- <?php echo _b_('Suivi-à'); ?>
- </td>
- <td>
- <input type="text" name="followup" value="" />
- </td>
- </tr>
- <tr>
- <td class="<?php echo $css['bicoltitre'];?>">
- <?php echo _b_('Organisation'); ?>
- </td>
- <td>
- <?php echo $banana->profile['org']; ?>
- </td>
- </tr>
- <tr>
- <th colspan="2">
- <?php echo _b_('Corps'); ?>
- </th>
- </tr>
- <tr>
- <td class="<?php echo $css['bicolvpadd'];?>" colspan="2">
- <textarea name="body" cols="90" rows="16"><?php
- echo htmlentities($body);
- if ($banana->profile['sig']) echo "\n\n-- \n".htmlentities($banana->profile['sig']);
- ?></textarea>
- </td>
- </tr>
- <tr>
- <td class="<?php echo $css['bouton']?>" colspan="2">
-<?php
-if (isset($group) && isset($id) && isset($_REQUEST['type'])
- && ($_REQUEST['type']=='followup')) {
-?>
- <input type="hidden" name="type" value="followupok" />
- <input type="hidden" name="group" value="<?php echo $group;?>" />
- <input type="hidden" name="id" value="<?php echo $id;?>" />
-<?php
-} else {
-?>
- <input type="hidden" name="type" value="new" />
-<?php
-}
-?>
- <input type="submit" name="action" value="OK" />
- </td>
- </tr>
-</table>
+ <table class="bicol" cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <th colspan="2">
+ <?php echo _b_('En-têtes'); ?>
+ </th>
+ </tr>
+ <tr>
+ <td class="<?php echo $css['bicoltitre'];?>">
+ <?php echo _b_('Nom'); ?>
+ </td>
+ <td>
+ <?php echo htmlentities($banana->profile['name']); ?>
+ </td>
+ </tr>
+ <tr>
+ <td class="<?php echo $css['bicoltitre'];?>">
+ <?php echo _b_('Sujet'); ?>
+ </td>
+ <td>
+ <input type="text" name="subject" value="<?php if (isset($subject)) echo $subject; ?>" />
+ </td>
+ </tr>
+ <tr>
+ <td class="<?php echo $css['bicoltitre'];?>">
+ <?php echo _b_('Forums'); ?>
+ </td>
+ <td>
+ <input type="text" name="newsgroups" value="<?php if (isset($target)) echo $target; ?>" />
+ </td>
+ </tr>
+ <tr>
+ <td class="<?php echo $css['bicoltitre'];?>">
+ <?php echo _b_('Suivi-à'); ?>
+ </td>
+ <td>
+ <input type="text" name="followup" value="" />
+ </td>
+ </tr>
+ <tr>
+ <td class="<?php echo $css['bicoltitre'];?>">
+ <?php echo _b_('Organisation'); ?>
+ </td>
+ <td>
+ <?php echo $banana->profile['org']; ?>
+ </td>
+ </tr>
+ <tr>
+ <th colspan="2">
+ <?php echo _b_('Corps'); ?>
+ </th>
+ </tr>
+ <tr>
+ <td class="<?php echo $css['bicolvpadd'];?>" colspan="2">
+ <textarea name="body" cols="90" rows="16"><?php
+ echo htmlentities($body);
+ if ($banana->profile['sig']) echo "\n\n-- \n".htmlentities($banana->profile['sig']);
+ ?></textarea>
+ </td>
+ </tr>
+ <tr>
+ <td class="<?php echo $css['bouton']?>" colspan="2">
+ <?php
+ if (isset($group) && isset($id) && isset($_REQUEST['type'])
+ && ($_REQUEST['type']=='followup')) {
+ ?>
+ <input type="hidden" name="type" value="followupok" />
+ <input type="hidden" name="group" value="<?php echo $group;?>" />
+ <input type="hidden" name="id" value="<?php echo $id;?>" />
+ <?php
+ } else {
+ ?>
+ <input type="hidden" name="type" value="new" />
+ <?php
+ }
+ ?>
+ <input type="submit" name="action" value="OK" />
+ </td>
+ </tr>
+ </table>
</form>
<?php
-displayshortcuts();
+echo displayshortcuts();
require_once("include/footer.inc.php");
?>
?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
-<table class="<?php echo $css["bicol"];?>" cellspacing="0" cellpadding="2">
+<table class="bicol" cellspacing="0" cellpadding="2">
<tr>
<th>
<?php echo _b_('Total'); ?>
$groupinfo = $banana->nntp->group($g);
$newarts = $banana->nntp->newnews($banana->profile['lastnews'], $g);
?>
- <tr class="<?php echo ($pair?$css["pair"]:$css["impair"]);?>" >
- <td class="<?php echo $css["total"]; ?>">
+ <tr class="<?php echo ($pair?"pair":"impair");?>" >
+ <td class="tot">
<?php echo $groupinfo[0]; ?>
</td>
- <td class="<?php echo $css["unread"]; ?>">
+ <td class="new">
<input type="checkbox" name="subscribe[]" value="<?php echo $g;?>"
<?php if (in_array($g, $banana->profile['subscribe'])) echo 'checked="checked"'; ?> />
</td>
- <td class="<?php echo $css["group"]; ?>">
+ <td class="grp">
<?php echo "<a href=\"thread.php?group=$g\">$g</a>";?>
</td>
- <td class="<?php echo $css["description"]; ?>">
+ <td class="dsc">
<?php echo $d[0];?>
</td>
</tr>
<?php
}
?>
- <tr class="<?php echo (!$pair?$css["pair"]:$css["impair"]); ?>">
+ <tr class="<?php echo (!$pair?"pair":"impair"); ?>">
<td colspan="4" class="bouton">
<input type="submit" name="action" value="OK" />
</td>
<?php
-passthru('echo '.escapeshellarg(base64_decode($_REQUEST['face'])).'|uncompface -X |convert xbm:- png:-');
+header('Content-Type: image/jpeg');
+passthru('echo '.escapeshellarg(base64_decode($_REQUEST['face'])).'|uncompface -X |convert xbm:- jpg:-');
?>