Esempio n. 1
0
  **************************************************/
// menu
echo table::open();
echo table::tds(array(array('class' => 'tableb', 'text' => html::button('forum.php?c=admin', Lang::item('admin.home')) . NBSP . html::button('forum.php?c=admin&m=newcat', Lang::item('admin.new_category')) . NBSP . html::button('forum.php?c=admin&m=setting', Lang::item('admin.setting')))));
echo table::close();
echo table::open();
echo form::open('forum.php?c=admin&m=setting');
echo table::td('Forum Setting', 2);
if (count($errors) > 0) {
    echo table::tds(array(array('class' => 'tableh2', 'colspan' => '2', 'text' => table::error($errors))));
}
echo table::td(html::b(Lang::item('admin.basic_features')), 2, 'tableh2');
echo table::tds(array(array('class' => 'tableb', 'width' => '50%', 'text' => Lang::item('admin.title')), array('class' => 'tableb', 'width' => '50%', 'text' => form::text('fr_title', Config::item('fr_title')))));
echo table::tds(array(array('class' => 'tableb', 'width' => '50%', 'text' => Lang::item('admin.allow_guest_browse')), array('class' => 'tableb', 'width' => '50%', 'text' => form::yesno('fr_guest_browse', Config::item('fr_guest_browse')))));
echo table::tds(array(array('class' => 'tableb', 'width' => '50%', 'text' => Lang::item('admin.allow_guest_post')), array('class' => 'tableb', 'width' => '50%', 'text' => form::yesno('fr_guest_post', Config::item('fr_guest_post')))));
echo table::tds(array(array('class' => 'tableb', 'width' => '50%', 'text' => Lang::item('admin.enable_message_icons')), array('class' => 'tableb', 'width' => '50%', 'text' => form::yesno('fr_msg_icons', Config::item('fr_msg_icons')))));
echo table::tds(array(array('class' => 'tableb', 'width' => '50%', 'text' => Lang::item('admin.time_online_checking')), array('class' => 'tableb', 'width' => '50%', 'text' => form::text('fr_time_online_checking', Config::item('fr_time_online_checking')))));
echo table::td(html::b(Lang::item('admin.topic_features')), 2, 'tableh2');
echo table::tds(array(array('class' => 'tableb', 'width' => '50%', 'text' => Lang::item('admin.topic_per_page')), array('class' => 'tableb', 'width' => '50%', 'text' => form::text('fr_topic_per_page', Config::item('fr_topic_per_page')))));
echo table::tds(array(array('class' => 'tableb', 'width' => '50%', 'text' => Lang::item('admin.hot_topic_msg')), array('class' => 'tableb', 'width' => '50%', 'text' => form::text('fr_hot_topic_msg', Config::item('fr_hot_topic_msg')))));
echo table::td(html::b(Lang::item('admin.message_features')), 2, 'tableh2');
echo table::tds(array(array('class' => 'tableb', 'width' => '50%', 'text' => Lang::item('admin.msg_per_page')), array('class' => 'tableb', 'width' => '50%', 'text' => form::text('fr_msg_per_page', Config::item('fr_msg_per_page')))));
echo table::tds(array(array('class' => 'tableb', 'width' => '50%', 'text' => Lang::item('admin.max_msg_size')), array('class' => 'tableb', 'width' => '50%', 'text' => form::text('fr_msg_max_size', Config::item('fr_msg_max_size')))));
echo table::tds(array(array('class' => 'tableb', 'width' => '50%', 'text' => Lang::item('admin.max_word_length')), array('class' => 'tableb', 'width' => '50%', 'text' => form::text('fr_max_word_length', Config::item('fr_max_word_length')))));
echo table::tds(array(array('class' => 'tableb', 'width' => '50%', 'text' => Lang::item('admin.gap_time')), array('class' => 'tableb', 'width' => '50%', 'text' => form::text('fr_gap_time', Config::item('fr_gap_time')))));
echo table::td(html::b(Lang::item('admin.profile_features')), 2, 'tableh2');
echo table::tds(array(array('class' => 'tableb', 'width' => '50%', 'text' => Lang::item('admin.avatar_size')), array('class' => 'tableb', 'width' => '50%', 'text' => form::text('fr_avatar_size', Config::item('fr_avatar_size')))));
echo table::tds(array(array('class' => 'tableb', 'width' => '50%', 'text' => Lang::item('admin.signature_max_size')), array('class' => 'tableb', 'width' => '50%', 'text' => form::text('fr_signature_max_size', Config::item('fr_signature_max_size')))));
echo table::tds(array(array('class' => 'tablef', 'colspan' => '2', 'text' => form::submit(Lang::item('common.modify'), 'submit') . form::reset(Lang::item('common.reset'), 'reset'))));
echo form::close();
echo table::close();
Esempio n. 2
0
echo table::td(Lang::item('home.latest_posts'), 2);
foreach ($recents as $recent) {
    echo table::tds(array(array('class' => 'tableb', 'text' => table::open(2) . table::tds(array(array('text' => sprintf(Lang::item('home.latest_post'), html::message_anchor($recent['msg_id'], $recent['subject']), html::profile_anchor($recent['poster_id'], $recent['poster_name']))), array('align' => 'right', 'text' => time::decode($recent['poster_time'])))) . table::close())));
}
echo table::close();
// left
$left_table = '';
$left_table .= table::open(3);
$left_table .= table::td(Lang::item('home.visitor_stats'), 4);
$left_table .= table::tds(array(array('class' => 'tableb', 'text' => Lang::item('home.t_r_m')), array('class' => 'tableb', 'text' => $stats['t_r_m']), array('class' => 'tableb', 'text' => Lang::item('home.t_li_u')), array('class' => 'tableb', 'text' => $stats['t_li_u'])));
$left_table .= table::tds(array(array('class' => 'tableb', 'text' => Lang::item('home.t_t')), array('class' => 'tableb', 'text' => $stats['t_t']), array('class' => 'tableb', 'text' => Lang::item('home.t_a_u')), array('class' => 'tableb', 'text' => $stats['t_a_u'])));
$left_table .= table::tds(array(array('class' => 'tableb', 'text' => Lang::item('home.t_r')), array('class' => 'tableb', 'text' => $stats['t_r']), array('class' => 'tableb', 'text' => ' '), array('class' => 'tableb', 'text' => ' ')));
$left_table .= table::close();
// right
foreach ($newest_members as $k => $v) {
    $newest_members[$k] = html::profile_anchor($v['user_id'], $v['user_name']);
}
$newest_members = implode(', ', $newest_members);
foreach ($active_members as $k => $v) {
    $active_members[$k] = html::profile_anchor($v['user_id'], $v['user_name']);
}
$active_members = implode(', ', $active_members);
$right_table = '';
$right_table .= table::open(3);
$right_table .= table::td(Lang::item('home.members'));
$right_table .= table::tds(array('class' => 'tableb', 'text' => Lang::item('home.newest_members') . $newest_members));
$right_table .= table::tds(array('class' => 'tableb', 'text' => Lang::item('home.active_members') . $active_members));
$right_table .= table::close();
echo table::open(array('align' => 'center', 'width' => -1, 'border' => 0, 'cellspacing' => 1, 'cellpadding' => 0));
echo table::tds(array(array('width' => '50%', 'valign' => 'top', 'text' => $left_table), array('width' => '50%', 'valign' => 'top', 'text' => $right_table)));
echo table::close();
Esempio n. 3
0
echo table::tds(array(array('class' => 'tablef', 'colspan' => 2, 'text' => form::submit(Lang::item('common.search'), 'submit'))));
echo form::close();
echo table::close();
if (count($messages) > 0) {
    echo html::spacer();
    // paging
    echo table::open();
    echo table::td(Lang::item('search.search_result') . ' - ' . sprintf(Lang::item('search.found'), $results));
    echo table::tds(array(array('class' => 'tableb', 'text' => Lang::item('board.page') . forum::paging($paging))));
    echo table::close();
    foreach ($messages as $message) {
        echo table::open();
        echo table::tds(array(array('class' => 'tableh1', 'text' => table::open(2) . table::tds(array(array('align' => 'left', 'width' => '70%', 'text' => forum::nagavitor($message['linkto'], '-->')), array('align' => 'right', 'width' => '30%', 'text' => Lang::item('search.on') . time::decode($message['poster_time'])))) . table::close())));
        echo table::tds(array(array('class' => 'tableh2', 'colspan' => 2, 'text' => Lang::item('search.start_by') . html::profile_anchor($message['starter_id'], $message['starter_name']) . ' | ' . Lang::item('search.message_by') . html::profile_anchor($message['poster_id'], $message['poster_name']))));
        echo table::tds(array(array('class' => 'tableb', 'colspan' => 2, 'text' => forum::format_message($message['body']))));
        echo table::close();
    }
    // paging
    echo table::open();
    echo table::tds(array(array('class' => 'tableb', 'text' => Lang::item('board.page') . forum::paging($paging))));
    echo table::close();
    echo html::spacer();
} else {
    if (isset($search)) {
        echo table::open();
        echo table::td(Lang::item('search.search_result'));
        echo table::tds(array(array('class' => 'tableb', 'text' => Lang::item('search.no_result'))));
        echo table::close();
        echo html::spacer();
    }
}
Esempio n. 4
0
 function title($title, $colspan = 1, $class = 'tableh1')
 {
     // backward
     return table::td($title, $colspan, $class);
 }
Esempio n. 5
0
                 echo "\nnumber {$row['Year']}-{$row['Report']}?</p>\n<form action='" . $_SERVER["PHP_SELF"] . "'>\n  <input type='hidden' name='nor_pp_mode' value='{$nor_pp_mode}'>\n  <input type='hidden' name='nor_pp_period' value='{$nor_pp_period}'>\n  <input type='hidden' name='rowId' value='{$rowId}'>\n  <p><input type='submit' name='confirmed' value='yes'>\n     <input type='submit' name='confirmed' value='no'></p>\n</form>\n";
             }
         }
     }
     break;
 case NOR_PP_MODE_EDIT:
     nor_pp_require_row_owner($rowId, $AUTH_login);
     startPage("Edit Preprints" . ($authClass->isAdmin() ? " (Admin)" : ""));
     $res = $dbClass->query("SELECT * FROM publications WHERE RowId={$rowId}");
     $row = mysql_fetch_array($res);
     $default_field = nl2html($row["Field"]);
     $t = new table("class='framed'", "<center>" . "<form action='update_preprint.php' enctype='multipart/form-data' method='post'>\n" . "<input type='hidden' name='pp_id' value='" . pp_preprintID($row["Year"], $row["Report"]) . "'>\n" . "<input type='hidden' name='nor_pp_period' value='{$nor_pp_period}'>\n" . "<input type='hidden' name='nor_pp_mode'   value='{$nor_pp_mode}'>\n");
     getEditDialog();
     $t->tro("align='left'");
     $t->th("", "entry owner");
     $t->td("", make_user_selection($row["Id"]));
     $t->trc();
     $t->tr("", "", "<input name='button' type='submit' value='continue'> " . "<input name='button' type='submit' value='cancel'>", "&nbsp;");
     $t->close("</form></center>");
     break;
 case NOR_PP_MODE_REGISTER:
     nor_pp_require_row_owner($rowId, $AUTH_login);
     startPage("Preprint registered in database");
     $dbClass->query("UPDATE publications SET Status='registered',Tm='" . time() . "' WHERE RowId='{$rowId}'");
     $res = $dbClass->query("SELECT * FROM publications WHERE RowId={$rowId}");
     $row = mysql_fetch_array($res);
     mail2secretary("Registered");
     echo "<p>Your preprint has been registered, and is waiting for acceptance</p>\n";
     echo "<p><a href='show_preprints.php'>Return to preprints</a>.</p>";
     show_preprint($rowId, "show_preprints.php");
     break;
Esempio n. 6
0
if (count($messages) == 0) {
    echo table::open();
    echo table::td(Lang::item('topic.no_message'), 1, 'tableb');
    echo table::close();
}
// paging
echo table::open();
echo table::tds(array(array('class' => 'tableb', 'text' => table::open(2) . table::tds(array(array('width' => '70%', 'align' => 'left', 'text' => Lang::item('board.page') . forum::paging($paging)), array('width' => '30%', 'align' => 'right', 'text' => (check_model::can_reply($topic_id) ? html::jsbutton('show_section(\'fastreply\');', Lang::item('topic.fast_reply')) . NBSP . html::button('forum.php?c=topic&m=reply&id=' . $topic_id, Lang::item('topic.reply')) : '') . NBSP . ($authorizer->is_user() ? html::jsbutton("button_confirm('" . ($authorizer->is_notify_topic($topic_id) ? Lang::item('topic.disable_notify') : Lang::item('topic.active_notify')) . "','" . ($authorizer->is_notify_topic($topic_id) ? 'forum.php?c=topic&m=unnotify&id=' . $topic_id : 'forum.php?c=topic&m=notify&id=' . $topic_id) . "');", Lang::item('topic.notify')) . NBSP : '')))) . table::close())));
echo html::spacer();
echo table::open();
echo table::tds(array(array('class' => 'tableb', 'text' => table::open(2) . table::tds(array(array('width' => '66%', 'text' => ($authorizer->can_moderator_topic($topic_id) ? html::button('forum.php?c=topic&m=locked&id=' . $topic_id, $authorizer->is_locked($topic_id) ? Lang::item('topic.unlock_topic') : Lang::item('topic.lock_topic')) . NBSP : '') . ($authorizer->can_moderator_topic($topic_id) ? html::button('forum.php?c=topic&m=sticky&id=' . $topic_id, $authorizer->is_sticky($topic_id) ? Lang::item('topic.unsticky_topic') : Lang::item('topic.sticky_topic')) . NBSP : '') . ($authorizer->can_moderator_topic($topic_id) ? html::jsbutton("button_confirm('" . Lang::item('topic.confirm_delete') . "','forum.php?c=topic&m=delete&id={$topic_id}');", Lang::item('topic.delete_topic')) . NBSP : '') . ($authorizer->can_moderator_topic($topic_id) ? html::button('forum.php?c=topic&m=move&id=' . $topic_id, Lang::item('topic.move_topic')) : '')), array('width' => '33%', 'align' => 'right', 'text' => forum::redirect_box($cbs, $board_id)))) . table::close())));
echo table::close();
echo "<div id=\"fastreply\" style=\"display: none;\">";
echo table::open();
echo form::open('forum.php?c=topic&m=reply&id=' . $topic_id, 'fastreply', 'post');
echo table::td(Lang::item('topic.topic_reply'), 4);
echo table::tds(array(array('class' => 'tableb', 'width' => '30%', 'text' => Lang::item('topic.subject')), array('class' => 'tableb', 'width' => '70%', 'text' => form::text('subject', Lang::item('topic.re') . $topic_name))));
if (Config::item('fr_msg_icons') == 1) {
    echo table::tds(array(array('class' => 'tableb', 'text' => Lang::item('topic.message_icon')), array('class' => 'tableb', 'text' => forum::generate_message_icons('icon', $icons, 'icon1'))));
}
echo table::tds(array(array('class' => 'tableb', 'text' => NBSP), array('class' => 'tableb', 'text' => forum::generate_bbcode_tags('fastreply', 'body'))));
echo table::tds(array(array('class' => 'tableb', 'text' => Lang::item('topic.message')), array('class' => 'tableb', 'text' => form::textarea('body'))));
global $CONFIG;
if ($CONFIG['comment_captcha'] == 1 || $CONFIG['comment_captcha'] == 2 && !USER_ID) {
    global $lang_common;
    print table::tds(array(array('class' => 'tableb', 'text' => $lang_common['confirm']), array('class' => 'tableb', 'text' => '<input type="text" name="confirmCode" size="5" maxlength="5" class="textinput" /><img src="captcha.php" align="middle" border="0" alt="" />')));
}
echo table::tds(array(array('class' => 'tableb', 'text' => NBSP), array('class' => 'tableb', 'text' => generate_smilies('fastreply', 'body'))));
echo table::tds(array(array('class' => 'tablef', 'text' => NBSP), array('class' => 'tablef', 'text' => form::submit(Lang::item('common.reply'), 'submit'))));
echo form::close();
echo table::close();
Esempio n. 7
0
<?php

/**************************************************
  Coppermine 1.5.x Plugin - forum
  *************************************************
  Copyright (c) 2010 foulu (Le Hoai Phuong), eenemeenemuu
  *************************************************
  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 3 of the License, or
  (at your option) any later version.
  ********************************************
  $HeadURL$
  $Revision$
  $LastChangedBy$
  $Date$
  **************************************************/
print table::open();
print form::open('forum.php?c=topic&amp;m=move&amp;id=' . $topic_id);
print table::td(Lang::item('topic.move_topic'), 2);
print table::tds(array(array('class' => 'tableb', 'width' => '30%', 'text' => Lang::item('topic.topic_name')), array('class' => 'tableb', 'width' => '70%', 'text' => $topic['name'])));
print table::tds(array(array('class' => 'tableb', 'width' => '30%', 'text' => Lang::item('topic.move_to')), array('class' => 'tableb', 'text' => forum::topic_move_box($topic_move_data, $topic['board_id']))));
print table::tds(array(array('class' => 'tablef', 'colspan' => 2, 'text' => form::submit(Lang::item('common.move'), 'submit'))));
print form::close();
print table::close();
Esempio n. 8
0
function show_preprint($rowId, $action, $showcancelButton = True)
{
    global $dbClass;
    $res = $dbClass->query("SELECT * FROM publications WHERE RowId='" . $rowId . "'");
    $row = $dbClass->next_record($res);
    $c = "class='align_right'";
    $t = new table("cellpadding='2'", "<form action='loader.php?rowId=" . $rowId . "&amp;action=" . $action . "' method='POST'>");
    if ($showcancelButton) {
        $missing = x("", "?");
    } else {
        $missing = False;
    }
    $field = nl2html($GLOBALS["NOR_fields"][$row["Field"]]);
    $authors = nl2html($row["Authors"], $missing);
    $title = nl2html($row["Title"], $missing);
    $location = nl2html($row["Location"], $missing);
    $journal = nl2html($row["PublIn"], $missing);
    $t->tro();
    $t->th($c, "Preprint :");
    $t->td("", pp_preprintID($row["Year"], $row["Report"]));
    $t->trc();
    $t->tro();
    $t->th($c, "Field :");
    $t->td("", $field);
    $t->trc();
    $t->tro();
    $t->th($c, "Authors :");
    $t->td("", $authors);
    $t->trc();
    if ($location) {
        $t->tro();
        $t->th($c, "Location :");
        $t->td("", $location);
        $t->trc();
    }
    if ($journal) {
        $t->tro();
        $t->th($c, "Published in :");
        $t->td("", $journal);
        $t->trc();
    }
    $t->tro();
    $t->th($c, "Entered by :");
    $t->td("", uid2gecos($row["Id"]));
    $t->trc();
    $buttons[] = "<input type='submit' value='continue' name='button'>";
    if ($showcancelButton) {
        $buttons[] = "<input type='submit' value='cancel' name='button'>" . "<input type='hidden' name='load' value='show_preprints.php'>";
    } else {
        $buttons[] = "<input type='submit' value='update information for this preprint' name='button'>" . "<input type='hidden' name='load' value='edit_preprints.php'>" . "<input type='hidden' name='nor_pp_mode' value='" . NOR_PP_MODE_EDIT . "'>";
    }
    $t->tro();
    $t->td();
    $t->td("", join("&nbsp;", $buttons));
    $t->trc();
    if (!$showcancelButton) {
        $t->tr("", "colspan='3'", x("i", "<br>When you have published this preprint in a Public Archive<br>" . "(i.e. you know the URL to the abstract)<br>please return and complete the form.<br><br>" . "If you want to publish _only_ at Nordita you can upload your paper now.<br>" . "Note, you can correct eventual typos at any time, and you may also cancel the preprint reservation."));
    }
    $t->close("</form>");
}
Esempio n. 9
0
function add_SQLuser()
{
    global $t, $links, $tabs, $dbClass, $authClass;
    if (!$_REQUEST["t"]) {
        $_REQUEST["t"] = "event";
    }
    $accE = $_REQUEST["t"] == "event";
    $error = array();
    if ($_REQUEST["button"]) {
        $users = getSQLusers();
        if ($v = $_REQUEST["full_name"]) {
            foreach ($users as $k => $u) {
                if (strToLower($u["gecos"]) == strToLower($v)) {
                    $error[] = x("li", "'{$v}' is already known as '{$u['email']}'");
                }
            }
            if ($accE && !eregi("20[0-9][0-9]\$", $v)) {
                $error[] = x("li", "'event title' must have the year at the end");
            }
        }
        if ($v = strToLower($_REQUEST["username"])) {
            foreach ($users as $k => $u) {
                if (strToLower($u["email"]) == strToLower($v)) {
                    $error[] = x("li", "'{$v}' is already known as '{$u['gecos']}'");
                }
            }
            if ($accE && !eregi("^[a-z0-9]*\$", $v)) {
                $error[] = x("li", "'{$v}' is not a valid login name");
            }
            if (!$accE && !eregi("@", $v)) {
                $error[] = x("li", "'{$v}' is not a valid e-mail address");
            }
        }
    }
    if ($error || !$_REQUEST["username"] || !$_REQUEST["full_name"]) {
        /*
         * (re)send the form
         */
        $tt = new table("cellpadding='10'", "<center>" . x("h3", "Adding new external user"));
        $tt->tr("", "valign='top' colspan='3'", x("i", "The external user account is associated either with a <ul>" . "<li> a person (identified by his e-mail and password) or</li>" . "<li> a Nordita event (program, conference, etc.)</li></ul>"));
        $tt->tro();
        $tt->td($accE ? "Both the <b>event title</b> and <b>login name</b><br>must end by the 4-digits Year." . "<br><br><b>contact e-mail</b> is a comma-separated list<br>of the organizer e-mails" : "");
        $tt->tdo("valign='top'");
        $t = new table("", "<form action='" . $links[$tabs->active] . "' method='post'>");
        if ($error) {
            str(False, "errors detected:" . x("ul", join("\n", $error)), "colspan='3' class='registered'");
        }
        $r = "input type ='radio' name='t' onchange='submit()'";
        str("account type", "<{$r} value='human' " . ($accE ? "" : "checked") . ">personal account <{$r} value='event' " . ($accE ? "checked" : "") . ">event account");
        str($accE ? "event title" : "full name", "<input type='text' name='full_name' value='{$_REQUEST['full_name']}' size='35'>");
        str($accE ? "login name" : "e-mail", "<input type='text' name='username'  value='{$_REQUEST['username']}'  size='35'>");
        if ($accE) {
            str("proposed password", "<input type='password' name='pwd'  value='{$_REQUEST['pwd']}'  size='35'>");
        }
        if ($accE) {
            str("confirm password", "<input type='password' name='pwd2' value='{$_REQUEST['pwd2']}' size='35'>");
        }
        if ($accE) {
            str("contact e-mail(s)", "<input type='text' name='contact' value='{$_REQUEST['contact']}'  size='35'>");
        }
        str(" ", "<input type='submit' name='button' value='submit'> <input type='submit' name='button' value='cancel'>");
        $t->close("</form>");
        $tt->tdc();
        $tt->trc();
        $tt->close("</center>");
    } else {
        /*
         * the form is ok. Create the account, send info mail
         */
        $users = getSQLusers();
        $uid = -1000;
        while ($users[$uid]) {
            --$uid;
        }
        if (!$_REQUEST["pwd"]) {
            $_REQUEST["pwd"] = $authClass->random_password(8);
        }
        $dbClass->query("INSERT INTO accounts (id,username,password,new_password,full_name,status,superviser) " . "VALUES ('{$uid}','{$_REQUEST['username']}','{$_REQUEST['pwd']}','{$_REQUEST['pwd']}','{$_REQUEST['full_name']}',1,'{$_REQUEST['contact']}')");
        logIt("newuser", $_REQUEST["username"], $_REQUEST["full_name"]);
        print x("h3", "New user for the Preprints Database");
        $t = new table();
        #   $t->tr("","",$uid,"uid:");
        $t->tr("", "", $_REQUEST["full_name"], "name:");
        $t->tr("", "", $_REQUEST["username"], x("b", "login name:"));
        if ($_REQUEST["contact"]) {
            $t->tr("", "", $_REQUEST["contact"], x("b", "contact e-mail:"));
        } else {
            $t->tr("", "colspan='2'", x("i", "The password is sent to " . $_REQUEST["username"]));
        }
        $t->close();
        mail2newUser($_REQUEST["username"]);
    }
}
Esempio n. 10
0
                $t->td($s);
                $t->td($s);
                $t->trc();
            }
            break;
    }
}
$t->close("</div>&nbsp;<br>");
if (False && @$counter) {
    $t = new table("width='100%'", "<br><br><div id='preprints' class='pp_list'>");
    $t->tro();
    $t->th("colspan=2", "Legend");
    $t->trc();
    if (@$counter["reserved"]) {
        $t->tro();
        $t->td("class='reserved' align='right'", "Reserved preprint numbers (bold red)");
        $t->td("class='reserved' align='left'", "These preprints should be completed and registered as soon as possible");
        $t->trc();
    }
    if (@$counter["registered"]) {
        $t->tro();
        $t->td("class='registered' align='right'", "Registered preprints (red on grey)");
        $t->td("class='registered' align='left'", "These preprints are waiting for acceptance, possibly they are not completed");
        $t->trc();
    }
    if (@$counter["unused"]) {
        $t->tro();
        $t->td("class='unused' align='right'", "Unused preprint numbers (pale blue background)");
        $t->td("class='unused' align='left'");
        $t->trc();
    }
Esempio n. 11
0
/**************************************************
  Coppermine 1.5.x Plugin - forum
  *************************************************
  Copyright (c) 2010 foulu (Le Hoai Phuong), eenemeenemuu
  *************************************************
  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 3 of the License, or
  (at your option) any later version.
  ********************************************
  $HeadURL$
  $Revision$
  $LastChangedBy$
  $Date$
  **************************************************/
// menu
echo table::open();
echo table::tds(array(array('class' => 'tableb', 'text' => html::button('forum.php?c=admin', Lang::item('admin.home')) . NBSP . html::button('forum.php?c=admin&amp;m=newcat', Lang::item('admin.new_category')) . NBSP . html::button('forum.php?c=admin&amp;m=setting', Lang::item('admin.setting')) . NBSP . html::button('forum.php?c=admin&amp;m=update', Lang::item('admin.update')))));
echo table::close();
// start
echo table::open();
echo table::td(Lang::item('admin.mdf_boards'), 6);
echo table::tds(array(array('class' => 'tableh1', 'width' => '60%', 'text' => Lang::item('admin.name')), array('class' => 'tableh1', 'width' => '20%', 'colspan' => '4', 'align' => 'center', 'text' => Lang::item('admin.operator')), array('class' => 'tableh1', 'width' => '20%', 'align' => 'center', 'text' => Lang::item('admin.move'))));
foreach ($cats as $cat) {
    echo table::tds(array(array('class' => 'tableh2', 'text' => html::bold($cat['name'])), array('class' => 'tableh2', 'width' => '5%', 'align' => 'center', 'text' => $cat['up']), array('class' => 'tableh2', 'width' => '5%', 'align' => 'center', 'text' => $cat['down']), array('class' => 'tableh2', 'width' => '5%', 'align' => 'center', 'text' => html::anchor('forum.php?c=admin&amp;m=editcat&amp;id=' . $cat['id'], html::img($img['edit']))), array('class' => 'tableh2', 'width' => '5%', 'align' => 'center', 'text' => html::anchor('forum.php?c=admin&amp;m=delcat&amp;id=' . $cat['id'], html::img($img['delete']), array('onclick' => "return anchor_confirm('" . Lang::item('admin.confirm_del_cat') . "');"))), array('class' => 'tableh2', 'text' => NBSP)));
    foreach ($cat['boards'] as $board) {
        echo table::tds(array(array('class' => 'tableb', 'text' => forum::indent($board['level'] + 1) . html::bold($board['name'])), array('class' => 'tableb', 'width' => '5%', 'align' => 'center', 'text' => $board['up']), array('class' => 'tableb', 'width' => '5%', 'align' => 'center', 'text' => $board['down']), array('class' => 'tableb', 'width' => '5%', 'align' => 'center', 'text' => html::anchor('forum.php?c=admin&amp;m=editboard&amp;id=' . $board['id'], html::img($img['edit']))), array('class' => 'tableb', 'width' => '5%', 'align' => 'center', 'text' => html::anchor('forum.php?c=admin&amp;m=delboard&amp;id=' . $board['id'], html::img($img['delete']), array('onclick' => "return anchor_confirm('" . Lang::item('admin.confirm_del_board') . "');"))), array('class' => 'tableb', 'text' => forum::board_move_box($board_move_data, $board['id'], $cat['id'], $board['level'], $board['parent']))));
    }
    echo table::tds(array(array('class' => 'tableb', 'align' => 'right', 'colspan' => '6', 'text' => html::button('forum.php?c=admin&amp;m=newboard&amp;id=' . $cat['id'], Lang::item('admin.new_board')))));
}
echo table::close();
Esempio n. 12
0
echo table::tds(array(array('class' => 'tableb', 'text' => table::open(2) . table::tds(array(array('width' => '70%', 'align' => 'left', 'text' => Lang::item('board.page') . forum::paging($paging)), array('width' => '30%', 'align' => 'right', 'text' => ($authorizer->is_user() ? html::jsbutton("button_confirm('" . ($authorizer->is_notify_board($board_id) ? Lang::item('board.disable_notify') : Lang::item('board.active_notify')) . "','" . ($authorizer->is_notify_board($board_id) ? 'forum.php?c=board&m=unnotify&id=' . $board_id : 'forum.php?c=board&m=notify&id=' . $board_id) . "');", Lang::item('board.notify')) . NBSP : '') . ($authorizer->can_create_topic(board_id) ? html::button('forum.php?c=board&amp;m=newtopic&amp;id=' . $board_id, Lang::item('board.new_topic')) : '')))) . table::close())));
echo table::close();
// topic listing
echo table::open();
echo table::td(Lang::item('board.topics'), 5);
echo table::tds(array(array('class' => 'tableh2', 'width' => '60%', 'colspan' => '2', 'text' => html::bold(Lang::item('board.topic_title'))), array('class' => 'tableh2', 'width' => '5%', 'text' => html::bold(Lang::item('board.replies'))), array('class' => 'tableh2', 'width' => '5%', 'text' => html::bold(Lang::item('board.views'))), array('class' => 'tableh2', 'width' => '30%', 'text' => html::bold(Lang::item('board.latest_post_info')))));
foreach ($topics as $topic) {
    $buffer = '';
    $buffer .= table::open(array());
    if (Config::item('fr_msg_icons') == 1) {
        $buffer .= table::tds(array(array('text' => html::img($topic['icon'])), array('text' => NBSP), array('text' => html::topic_anchor($topic['id'], $topic['name']))));
    } else {
        $buffer .= table::tds(array(array('text' => html::topic_anchor($topic['id'], $topic['name']))));
    }
    $buffer .= table::close();
    echo table::tds(array(array('class' => 'tableb', 'width' => '0%', 'align' => 'center', 'text' => html::img($topic['status'])), array('class' => 'tableb', 'width' => '60%', 'align' => 'left', 'valign' => 'middle', 'text' => $buffer), array('class' => 'tableb', 'align' => 'center', 'text' => $topic['replies']), array('class' => 'tableb', 'align' => 'center', 'text' => $topic['views']), array('class' => 'tableb', 'valign' => 'top', 'text' => $topic['last_post_id'] ? html::span(sprintf(Lang::item('home.last_post_title'), html::message_anchor($topic['last_post_id'], $topic['last_post_title']), time::decode($topic['last_post_time']), html::profile_anchor($topic['last_post_author_id'], $topic['last_post_author_name']))) : '')));
}
if (count($topics) == 0) {
    echo table::td(Lang::item('board.no_topic'), 5, 'tableb');
}
echo table::close();
// paging
echo table::open();
echo table::tds(array(array('class' => 'tableb', 'text' => table::open(2) . table::tds(array(array('width' => '70%', 'align' => 'left', 'text' => Lang::item('board.page') . forum::paging($paging)), array('width' => '30%', 'align' => 'right', 'text' => ($authorizer->is_user() ? html::jsbutton("button_confirm('" . ($authorizer->is_notify_board($board_id) ? Lang::item('board.disable_notify') : Lang::item('board.active_notify')) . "','" . ($authorizer->is_notify_board($board_id) ? 'forum.php?c=board&m=unnotify&id=' . $board_id : 'forum.php?c=board&m=notify&id=' . $board_id) . "');", Lang::item('board.notify')) . NBSP : '') . ($authorizer->can_create_topic(board_id) ? html::button('forum.php?c=board&amp;m=newtopic&amp;id=' . $board_id, Lang::item('board.new_topic')) : '')))) . table::close())));
echo table::close();
echo html::spacer();
// legend
echo table::open();
echo table::tds(array(array('class' => 'tableh1', 'width' => '66%', 'text' => Lang::item('board.legend')), array('class' => 'tableh1', 'width' => '33%', 'text' => Lang::item('board.jump'))));
echo table::tds(array(array('class' => 'tableb', 'colspan' => 2, 'text' => table::open(2) . table::tds(array(array('class' => 'tableb', 'valign' => 'top', 'width' => '33%', 'text' => html::img('plugins/forum/forum/html/images/icon_topic.gif') . Lang::item('board.n_n_m') . '<br />' . html::img('plugins/forum/forum/html/images/icon_topic_new.gif') . Lang::item('board.n_m') . '<br />' . html::img('plugins/forum/forum/html/images/icon_topic_hot.gif') . sprintf(lang::item('board.h_t'), Config::item('fr_hot_topic_msg')) . '<br />'), array('class' => 'tableb', 'valign' => 'top', 'width' => '33%', 'text' => html::img('plugins/forum/forum/html/images/icon_topic_reply.gif') . Lang::item('board.s_t') . '<br />' . html::img('plugins/forum/forum/html/images/icon_topic_readonly.gif') . Lang::item('board.r_o_t') . '<br />'), array('class' => 'tableb', 'width' => '33%', 'valign' => 'middle', 'text' => forum::redirect_box($cbs, $board_id)))) . table::close())));
echo table::close();
Esempio n. 13
0
 public static function showMailsSent()
 {
     if (!empty(self::$sentMails)) {
         $t = new table("cellpadding='5' cellspacing='0' bgcolor='yellow' " . core_getConfig("errorWidth", "width=70%"));
         $t->tro();
         $t->th("colspan=3", "Important message");
         $t->trc();
         $many = count(self::$sentMails) > 1;
         $t->tr("", "colspan=3", "We have sent the following e-mail" . ($many ? "s" : "") . " (see below) with an important information.<br>" . "Please make sure that " . ($many ? "these e-mails are" : "this e-mail is") . " not considered as spam by the mail filter and that<br>" . ($many ? "they reach" : "it reaches") . " the address you indicated.<br>");
         $t->tro();
         $t->th("", "&nbsp;&nbsp;&nbsp;&nbsp;");
         $t->th("", $t->x("i", "To:"));
         $t->th("", $t->x("i", "Subject:"));
         $t->trc();
         foreach (self::$sentMails as $to => $v) {
             if (!$v || (int) $to) {
                 continue;
             }
             foreach ($v as $k => $subject) {
                 $t->tro();
                 $t->td();
                 $t->td("", $to);
                 $t->td("", $subject);
                 $t->trc();
                 $to = "";
             }
         }
         $t->close();
     }
 }
Esempio n. 14
0
core_declare_input("author", "");
core_declare_input("selectPP", "");
$title = array($NOR_fields[$group]);
if ($period != "all") {
    $title[] = $period;
}
if (TRUE) {
    $title[] = "preprints";
}
if ($author != "") {
    $title[] = "with author '" . $author . "'";
}
startPage(join(" ", $title));
$t = new table("width='95%'", "<form action='index.php' method='get'>");
$t->tro();
$t->td("align='left'", getSelection());
if ($authClass->authenticated()) {
    if (getAllPreprints()) {
        $t->td("", core_getLink("manage preprints", "show_preprints.php"));
    }
    if ($authClass->isAdmin()) {
        $t->td("", core_getLink("manage users", "edit_users.php"));
    }
    if ($authClass->isAdmin()) {
        $t->td("", core_getLink("see access log", "listLog.php"));
    }
    if (True) {
        $t->td("", core_getLink(PP_RESERVE, "edit_preprints.php?nor_pp_period=" . $nor_pp_period . "&amp;nor_pp_mode=" . NOR_PP_MODE_RESERVE));
    }
} else {
    $t->td("", "<div class='only_online'>" . pp_getLink("how to submit preprint", "howto.php", $modal = True) . "</div>");
Esempio n. 15
0
print table::close();
print "</div>";
print table::open();
print table::td(Lang::item('topic.topic_reply'), 2);
print form::open('forum.php?c=topic&m=reply&id=' . $topic_id, 'reply', 'post');
if (count($errors) > 0) {
    print table::td(table::error($errors), 2, 'tableh2');
}
print table::tds(array(array('class' => 'tableb', 'width' => '30%', 'text' => Lang::item('topic.subject')), array('class' => 'tableb', 'width' => '70%', 'text' => form::text('subject', $form['subject']))));
if (Config::item('fr_msg_icons') == 1) {
    print table::tds(array(array('class' => 'tableb', 'text' => Lang::item('topic.message_icon')), array('class' => 'tableb', 'text' => forum::generate_message_icons('icon', $icons, $form['icon']))));
}
print table::tds(array(array('class' => 'tableb', 'text' => NBSP), array('class' => 'tableb', 'text' => forum::generate_bbcode_tags('reply', 'body'))));
print table::tds(array(array('class' => 'tableb', 'text' => Lang::item('topic.message')), array('class' => 'tableb', 'text' => form::textarea('body', $form['body']))));
global $CONFIG;
if ($CONFIG['comment_captcha'] == 1 || $CONFIG['comment_captcha'] == 2 && !USER_ID) {
    global $lang_common;
    print table::tds(array(array('class' => 'tableb', 'text' => $lang_common['confirm']), array('class' => 'tableb', 'text' => '<input type="text" name="confirmCode" size="5" maxlength="5" class="textinput" /><img src="captcha.php" align="middle" border="0" alt="" />')));
}
print table::tds(array(array('class' => 'tableb', 'text' => NBSP), array('class' => 'tableb', 'text' => generate_smilies('reply', 'body'))));
print table::td(Lang::item('topic.addition_options'), 2, 'tablef');
print table::tds(array(array('class' => 'tableb', 'text' => Lang::item('topic.notify_this')), array('class' => 'tableb', 'text' => form::yesno('notify', $authorizer->is_notify_topic($topic_id) ? 1 : 0))));
/*
print table::tds(array(
    array('class'=>'tableb', 'text'=>Lang::item('topic.upload')),
    array('class'=>'tableb', 'text'=>''),
));
*/
print table::tds(array(array('class' => 'tablef', 'text' => NBSP), array('class' => 'tablef', 'text' => form::submit(Lang::item('common.reply'), 'submit') . html::jsbutton('return false;', Lang::item('common.preview'), array('id' => 'preview')) . NBSP . html::button('forum.php?c=topic&id=' . $topic_id, Lang::item('common.cancel')))));
print form::close();
print table::close();
Esempio n. 16
0
function core_tdbg($name, $key, $value)
{
    global $core_debug, $core_tableDbg, $prevDbg, $nDbg;
    if (!$core_debug) {
        return;
    }
    if (!isset($value)) {
        return;
    }
    $class = "class='core_debug log{$nDbg}'";
    if (!$core_tableDbg) {
        $core_tableDbg = new table('cellpadding=0 cellspacing=0', '<div align=left>');
    }
    $core_tableDbg->tro($class);
    // valign=top");
    $core_tableDbg->td(' width=10', $name == $prevDbg ? '' : $name . '&nbsp;');
    $core_tableDbg->td('', "{$key}&nbsp;");
    if (is_array($value)) {
        foreach ($value as $k => $v) {
            if ($ncount++) {
                $core_tableDbg->trc();
                $core_tableDbg->tro($class);
                $core_tableDbg->td();
                $core_tableDbg->td();
            }
            $core_tableDbg->td(' width=1', $k . "&nbsp;");
            $core_tableDbg->td('', core_formatString($key, $v));
        }
    } else {
        $core_tableDbg->td('' . ' colspan=9', core_formatString($key, $value));
    }
    $core_tableDbg->trc();
    $prevDbg = $name;
}
Esempio n. 17
0
<?php

/**************************************************
  Coppermine 1.5.x Plugin - forum
  *************************************************
  Copyright (c) 2010 foulu (Le Hoai Phuong), eenemeenemuu
  *************************************************
  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 3 of the License, or
  (at your option) any later version.
  ********************************************
  $HeadURL$
  $Revision$
  $LastChangedBy$
  $Date$
  **************************************************/
echo table::open();
echo form::open('forum.php?c=profile&amp;id=' . $user['user_id'], 'profile', 'post', TRUE);
echo table::td(Lang::item('profile.profile_title'), 4);
echo table::td(Lang::item('profile.avatar'), 4, 'tableh2');
echo table::tds(array(array('class' => 'tableb', 'width' => '5%', 'align' => 'center', 'text' => form::radio('avatar_type', 'url', '', $user['fr_avatar'] ? 'url' : '')), array('class' => 'tableb', 'width' => '20%', 'text' => Lang::item('profile.url')), array('class' => 'tableb', 'width' => '50%', 'text' => form::text('fr_avatar_url', $user['fr_avatar'])), array('class' => 'tableb', 'width' => '25%', 'align' => 'center', 'rowspan' => 2, 'text' => !php::is_empty_string($user['fr_avatar']) ? html::img($user['fr_avatar'], Config::item('fr_avatar_size')) . BR . BR . html::button('forum.php?c=profile&m=remove_avatar', Lang::item('profile.remove_avatar')) : '')));
echo table::tds(array(array('class' => 'tableb', 'align' => 'center', 'text' => form::radio('avatar_type', 'file')), array('class' => 'tableb', 'text' => Lang::item('profile.file')), array('class' => 'tableb', 'text' => form::file('fr_avatar_file'))));
echo table::td(Lang::item('profile.profile'), 4, 'tableh2');
echo table::tds(array(array('class' => 'tableb', 'colspan' => 2, 'rowspan' => 3, 'text' => Lang::item('profile.signature')), array('class' => 'tableb', 'colspan' => 2, 'text' => forum::generate_bbcode_tags('profile', 'fr_signature'))));
echo table::tds(array(array('class' => 'tableb', 'colspan' => 2, 'align' => 'center', 'text' => form::textarea('fr_signature', $user['fr_signature']))));
echo table::tds(array(array('class' => 'tableb', 'colspan' => 2, 'text' => generate_smilies('profile', 'fr_signature'))));
echo table::tds(array(array('class' => 'tablef', 'colspan' => 4, 'text' => form::submit(Lang::item('common.change'), 'submit'))));
echo form::close();
echo table::close();
Esempio n. 18
0
/**************************************************
  Coppermine 1.5.x Plugin - forum
  *************************************************
  Copyright (c) 2010 foulu (Le Hoai Phuong), eenemeenemuu
  *************************************************
  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 3 of the License, or
  (at your option) any later version.
  ********************************************
  $HeadURL$
  $Revision$
  $LastChangedBy$
  $Date$
  **************************************************/
// menu
echo table::open();
echo table::tds(array(array('class' => 'tableb', 'text' => html::button('forum.php?c=admin', Lang::item('admin.home')) . NBSP . html::button('forum.php?c=admin&amp;m=newcat', Lang::item('admin.new_category')) . NBSP . html::button('forum.php?c=admin&amp;m=setting', Lang::item('admin.setting')))));
echo table::close();
echo table::open();
echo form::open('forum.php?c=admin&m=editcat');
echo form::hidden('id', $cat_id);
echo table::td(Lang::item('admin.new_cat'), 2);
if (count($errors) > 0) {
    echo table::td(table::error($errors), 2, 'tableh2');
}
echo table::tds(array(array('class' => 'tableb', 'text' => Lang::item('admin.fullname')), array('class' => 'tableb', 'text' => form::text('name', $form['name']))));
echo table::tds(array(array('class' => 'tablef', 'colspan' => '2', 'text' => form::submit(Lang::item('common.modify'), 'submit'))));
echo form::close();
echo table::close();
Esempio n. 19
0
 function showMailsSent()
 {
     global $apps_listOfEmails;
     if ($apps_listOfEmails) {
         $t = new table("cellpadding='5' cellspacing='0' bgcolor='yellow' " . core_getConfig('errorWidth', 'width=70%'));
         $t->tro();
         $t->th('colspan=3', 'Important message');
         $t->trc();
         $many = count($apps_listOfEmails) > 1;
         $t->tr('', 'colspan=3', 'We have sent the following e-mail' . ($many ? 's' : '') . ' (see below) with an important information.<br>' . 'Please make sure that ' . ($many ? 'these e-mails are' : 'this e-mail is') . ' not considered as spam by the mail filter and that<br>' . ($many ? 'they reach' : 'it reaches') . ' the address you indicated.<br>');
         $t->tro();
         $t->th('', '&nbsp;&nbsp;&nbsp;&nbsp;');
         $t->th('', $t->x('i', "To:"));
         $t->th('', $t->x('i', "Subject:"));
         $t->trc();
         foreach ($apps_listOfEmails as $to => $v) {
             if (!$v || (int) $to) {
                 continue;
             }
             foreach ($v as $k => $subject) {
                 $t->tro();
                 $t->td();
                 $t->td('', $to);
                 $t->td('', $subject);
                 $t->trc();
                 $to = '';
             }
         }
         $t->close();
     }
 }