Exemple #1
0
                $act_alt = _ACTIVE;
            } else {
                $act_img = 'unchecked.gif';
                $act_alt = _INACTIVE;
            }
            echo '<tr' . $bgcolor . '>
		<td align="center"><strong>' . $mid . '</strong></td>
		<td align="left" style="width:100%;">' . $title . '</td>
		<td align="center">' . $mlanguage . '</td>
		<td align="center" style="white-space:nowrap;">' . $mview . '</td>
		<td align="center"><a href="' . URL::admin('&amp;status=' . $mid) . '"><img src="images/' . $act_img . '" alt="' . $act_alt . '" title="' . $act_alt . '" /></a></td>
		<td align="right" style="white-space:nowrap;"><a href="' . URL::admin('&amp;edit=' . $mid) . '">' . _EDIT . '</a> / <a href="' . URL::admin('&amp;del=' . $mid) . '">' . _DELETE . '</a>
		</td></tr>';
        }
        echo '</table><br />';
        CloseTable();
        echo '<br />';
        OpenTable();
        echo '<div style="text-align:center;" class="option">' . _ADDMSG . '</div><br />
	<form name="message" action="' . URL::admin('messages&amp;save=0') . '" method="post" enctype="multipart/form-data" accept-charset="utf-8">' . '<strong>' . _MESSAGETITLE . '</strong><br />' . '<input type="text" name="title" value="" size="50" maxlength="100" /><br /><br />' . '<strong>' . _MESSAGECONTENT . '</strong><br />' . bbcode_table('content', 'message', 1) . '<div style="float:left;">
	<textarea name="content" rows="15" wrap="virtual" cols="63" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);"></textarea></div>
	<div style="float: left; margin-left: 5px">' . smilies_table('inline', 'content', 'message') . '</div><br /><br />';
        if ($MAIN_CFG['global']['multilingual']) {
            echo '<strong>' . _LANGUAGE . '</strong> ' . lang_selectbox($MAIN_CFG['global']['language'], 'language') . '<br /><br />';
        } else {
            echo '<input type="hidden" name="language" value="" />';
        }
        echo '<strong>' . _EXPIRATION . '</strong> ' . select_box('expire', 0, array(86400 => '1 ' . _DAY, 172800 => '2 ' . _DAYS, 432000 => '5 ' . _DAYS, 1296000 => '15 ' . _DAYS, 2592000 => '30 ' . _DAYS, 0 => _UNLIMITED)) . '<br /><br />' . '<strong>' . _ACTIVATE2 . '</strong> ' . yesno_option('active', 1) . '<br /><br /><strong>' . _VIEWPRIV . '</strong> ' . group_selectbox('view', 0, true) . '<br /><br /><input type="submit" value="' . _ADDMSG . '" /></form>';
    }
}
CloseTable();
Exemple #2
0
function html_comments($pid)
{
    global $CONFIG, $USER, $CURRENT_ALBUM_DATA, $username, $FAVPICS, $CURRENT_PIC_DATA, $THEME_DIR;
    global $template_image_comments, $template_add_your_comment, $db;
    $html = '';
    if (!$CONFIG['enable_smilies']) {
        $tmpl_comment_edit_box = template_extract_block($template_image_comments, 'edit_box_no_smilies', '{EDIT}');
        template_extract_block($template_image_comments, 'edit_box_smilies');
        template_extract_block($template_add_your_comment, 'input_box_smilies');
    } else {
        $tmpl_comment_edit_box = template_extract_block($template_image_comments, 'edit_box_smilies', '{EDIT}');
        template_extract_block($template_image_comments, 'edit_box_no_smilies');
        template_extract_block($template_add_your_comment, 'input_box_no_smilies');
    }
    $tmpl_comments_buttons = template_extract_block($template_image_comments, 'buttons', '{BUTTONS}');
    $tmpl_comments_ipinfo = template_extract_block($template_image_comments, 'ipinfo', '{IPINFO}');
    $result = $db->sql_query("SELECT msg_id, msg_author, msg_body, msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='{$pid}' ORDER BY msg_id ASC", false, __FILE__, __LINE__);
    while ($row = $db->sql_fetchrow($result)) {
        $user_can_edit = GALLERY_ADMIN_MODE || USER_ID > 1 && USER_ID == $row['author_id'] && USER_CAN_POST_COMMENTS || USER_ID < 2 && USER_CAN_POST_COMMENTS && $USER['ID'] == $row['author_md5_id'];
        $comment_buttons = $user_can_edit ? $tmpl_comments_buttons : '';
        $comment_edit_box = $user_can_edit ? $tmpl_comment_edit_box : '';
        $comment_ipinfo = $row['msg_raw_ip'] && GALLERY_ADMIN_MODE ? $tmpl_comments_ipinfo : '';
        if ($CONFIG['enable_smilies']) {
            $comment_body = set_smilies(make_clickable($row['msg_body']));
            $smilies = smilies_table('onerow', 'msg_body', "f{$row['msg_id']}");
        } else {
            $comment_body = make_clickable($row['msg_body']);
            $smilies = '';
        }
        $params = array('{EDIT}' => &$comment_edit_box, '{BUTTONS}' => &$comment_buttons, '{IPINFO}' => &$comment_ipinfo);
        $template = template_eval($template_image_comments, $params);
        $info = '';
        if (!in_array($pid, $FAVPICS)) {
            $info = '<a href="' . URL::index('&amp;file=addfav&amp;pid=' . $CURRENT_PIC_DATA['pid']) . '" >' . ADDFAV . '</a>';
        } else {
            $info = '<a href="' . URL::index('&amp;file=addfav&amp;pid=' . $CURRENT_PIC_DATA['pid']) . '" >' . REMFAV . '</a>';
        }
        $params = array('{MSG_AUTHOR}' => $row['msg_author'], '{MSG_ID}' => $row['msg_id'], '{MSG_TYPE}' => GALLERY_ADMIN_MODE ? 'text' : 'hidden', '{EDIT_TITLE}' => COM_EDIT_TITLE, '{CONFIRM_DELETE}' => CONFIRM_DELETE_COM, '{DELETE_LINK}' => URL::index("&amp;file=delete"), '{DELETE_TEXT}' => DELETE . ' ' . COMMENT, '{MSG_DATE}' => localised_date($row['msg_date'], COMMENT_DATE_FMT), '{MSG_BODY}' => &$comment_body, '{MSG_BODY_RAW}' => $row['msg_body'], '{OK}' => OK, '{SMILIES}' => $smilies, '{HDR_IP}' => NET::decode_ip($row['msg_hdr_ip']), '{RAW_IP}' => NET::decode_ip($row['msg_raw_ip']), '{ACTION}' => 'action="' . URL::index('&amp;file=db_input') . '" enctype="multipart/form-data" accept-charset="utf-8"', '{ADDFAVLINK}' => URL::index("&amp;file=addfav&amp;pid={$pid}"), '{ADDFAVTEXT}' => $info, '{THEMEDIR}' => $THEME_DIR);
        $html .= template_eval($template, $params);
    }
    if (USER_CAN_POST_COMMENTS && $CURRENT_ALBUM_DATA['comments']) {
        if (USER_ID > 1) {
            $username_input = '<input type="hidden" name="msg_author" value="' . CPG_USERNAME . '" />';
            template_extract_block($template_add_your_comment, 'username_input', $username_input);
            // $username = '';
        } else {
            $username = isset($USER['name']) ? '"' . htmlprepare($USER['name']) . '"' : '"' . YOUR_NAME . '" onclick="javascript:this.value=\'\';"';
        }
        if (!in_array($pid, $FAVPICS)) {
            $info = '<a href="' . URL::index('&amp;file=addfav&amp;pid=' . $CURRENT_PIC_DATA['pid']) . '" >' . ADDFAV . '</a>';
        } else {
            $info = '<a href="' . URL::index('&amp;file=addfav&amp;pid=' . $CURRENT_PIC_DATA['pid']) . '" >' . REMFAV . '</a>';
        }
        $params = array('{ADD_YOUR_COMMENT}' => ADD_YOUR_COMMENT, '{NAME}' => COM_NAME, '{COMMENT}' => COMMENT, '{PIC_ID}' => $pid, '{username}' => $username, '{MAX_COM_LENGTH}' => $CONFIG['max_com_size'], '{OK}' => OK, '{SMILIES}' => '', '{ACTION}' => 'action="' . URL::index("&amp;file=db_input") . '" enctype="multipart/form-data" accept-charset="utf-8"', '{ADDFAVLINK}' => URL::index("&amp;file=addfav&amp;pid={$pid}"), '{ADDFAVTEXT}' => $info);
        if ($CONFIG['enable_smilies']) {
            $params['{SMILIES}'] = smilies_table('onerow', 'message', 'post');
        }
        //		if ($CONFIG['enable_smilies']) $params['{SMILIES}'] = generate_smilies();
        $html .= template_eval($template_add_your_comment, $params);
    }
    if (USER_ID > 1 or $CONFIG['allow_anon_fullsize'] or USER_IS_ADMIN) {
        return $html;
    }
}
Exemple #3
0
// optional
Module::$path = BASEDIR . "modules/{$Module->path_name}/";
// optional
Module::$is_home = $Module->name === $MAIN_CFG['global']['main_module'];
/* finished instructing class */
# check for permissions
$Module->allow();
# get module custom language
get_lang($Module->name, -1);
# setup blocks, showblocks may be depreciated in the near future
Blocks::$showblocks = $Module->sides;
/* compatibility */
$home = Module::$is_home;
$module_name = $Module->name;
$showblocks = $Module->sides;
$module_title = $Module->title;
/* end compatibility */
JS::add('includes/javascript/poodle.js');
if ($MAIN_CFG['global']['admin_help']) {
    JS::add('includes/javascript/infobox.js');
}
//MetaTag::add(Module::$metatag); // must include Page data already
require 'includes/meta.php';
require Module::$path . Module::$file . '.php';
if ($Module->name === 'smilies') {
    echo smilies_table('window', $_GET['field'], $_GET['form']);
    exit;
}
if (defined('HEADER_OPEN')) {
    require_once 'footer.php';
}
Exemple #4
0
   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.
  **************************************************************************
  $Source: /cvs/html/modules/coppermine/index.php,v $
  $Revision: 9.22 $
  $Author: phoenix $
  $Date: 2010/11/12 04:29:58 $
  ****************************************************************************/
if (!defined('CPG_NUKE')) {
    die('You do not have permission to access this file');
}
global $FAVPICS;
require_once 'includes/nbbcode.php';
if (isset($_GET['mode']) && $_GET['mode'] == 'smilies') {
    echo smilies_table("window", $field, $form);
    exit;
}
require "modules/" . $module_name . "/include/load.inc";
function html_albummenu($id)
{
    global $template_album_admin_menu;
    static $template = '';
    if ($template == '') {
        $params = array('{CONFIRM_DELETE}' => CONFIRM_DELETE_ALB, '{DELETE}' => DELETE, '{MODIFY}' => MODIFY, '{EDIT_PICS}' => EDIT_PICS);
        $template = template_eval($template_album_admin_menu, $params);
    }
    $params = array('{ALBUM_ID}' => $id);
    return template_eval($template, $params);
}
function get_subcat_data($parent, &$cat_data, &$album_set_array, $level, $ident = '')
Exemple #5
0
        } else {
            if (isset($post_data['icon_id']) && $val['icon_id'] == $post_data['icon_id']) {
                //this is the current icon for this thread (stored)
                $selected = 'selected';
            }
        }
        $template->assign_block_vars('topic_icon_option', array('S_ICON_ID' => $val['icon_id'], 'S_ICON_NAME' => $val['icon_name'], 'S_SELECTED' => $selected));
        //add this icons url to the javascript array
        $icons_array .= "icons_array[" . $val['icon_id'] . "] = '" . $val['icon_url'] . "';";
    }
    $template->assign_vars(array('ICONS_ARRAY' => $icons_array));
}
//
// Output the data to the template
//
$template->assign_vars(array('USERNAME' => $username, 'SUBJECT' => $subject, 'MESSAGE' => $message, 'HTML_STATUS' => $html_status, 'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="' . URL::index("&amp;file=faq&amp;mode=bbcode") . '" target="_phpbbcode">', '</a>'), 'SMILIES_STATUS' => $smilies_status, 'BBCODE_TABLE' => bbcode_table('message', 'post', 1), 'SMILES_TABLE' => smilies_table('inline', 'message', 'post'), 'L_EMOTICONS' => $lang['Emoticons'], 'L_SUBJECT' => $lang['Subject'], 'L_MESSAGE_BODY' => $lang['Message_body'], 'L_OPTIONS' => $lang['Options'], 'L_PREVIEW' => $lang['Preview'], 'L_SPELLCHECK' => $lang['Spellcheck'], 'L_SUBMIT' => $lang['Submit'], 'L_CANCEL' => $lang['Cancel'], 'L_CONFIRM_DELETE' => $lang['Confirm_delete'], 'L_DISABLE_HTML' => $lang['Disable_HTML_post'], 'L_DISABLE_BBCODE' => $lang['Disable_BBCode_post'], 'L_DISABLE_SMILIES' => $lang['Disable_Smilies_post'], 'L_ATTACH_SIGNATURE' => $lang['Attach_signature'], 'L_NOTIFY_ON_REPLY' => $lang['Notify'], 'L_DELETE_POST' => $lang['Delete_post'], 'L_EMPTY_MESSAGE' => $lang['Empty_message'], 'L_GO' => $lang['Go'], 'U_VIEWTOPIC' => $mode == 'reply' ? URL::index("&amp;file=viewtopic&amp;" . POST_TOPIC_URL . "={$topic_id}&amp;postorder=desc") : '', 'U_REVIEW_TOPIC' => $mode == 'reply' ? URL::index("&amp;file=posting&amp;mode=topicreview&amp;" . POST_TOPIC_URL . "={$topic_id}&amp;popup=1") : '', 'S_HTML_CHECKED' => !$html_on ? 'checked="checked"' : '', 'S_BBCODE_CHECKED' => !$bbcode_on ? 'checked="checked"' : '', 'S_SMILIES_CHECKED' => !$smilies_on ? 'checked="checked"' : '', 'S_SIGNATURE_CHECKED' => $attach_sig ? 'checked="checked"' : '', 'S_NOTIFY_CHECKED' => $notify_user ? 'checked="checked"' : '', 'S_TYPE_TOGGLE' => $topic_type_toggle, 'S_TOPIC_ID' => $topic_id, 'S_POST_ACTION' => URL::index('&amp;file=posting'), 'S_HIDDEN_FORM_FIELDS' => $hidden_form_fields, 'S_TOPIC_ICON_SELECT' => $set_topic_icon));
//
// Poll entry switch/output
//
if (($mode == 'newtopic' || $mode == 'editpost' && $post_data['edit_poll']) && $is_auth['auth_pollcreate']) {
    $template->assign_vars(array('L_ADD_A_POLL' => $lang['Add_poll'], 'L_ADD_POLL_EXPLAIN' => $lang['Add_poll_explain'], 'L_POLL_QUESTION' => $lang['Poll_question'], 'L_POLL_OPTION' => $lang['Poll_option'], 'L_ADD_OPTION' => $lang['Add_option'], 'L_UPDATE_OPTION' => $lang['Update'], 'L_DELETE_OPTION' => $lang['Delete'], 'L_POLL_LENGTH' => $lang['Poll_for'], 'L_DAYS' => $lang['Days'], 'L_POLL_LENGTH_EXPLAIN' => $lang['Poll_for_explain'], 'L_POLL_DELETE' => $lang['Delete_poll'], 'POLL_TITLE' => $poll_title, 'POLL_LENGTH' => $poll_length));
    if ($mode == 'editpost' && $post_data['edit_poll'] && $post_data['has_poll']) {
        $template->assign_block_vars('switch_poll_delete_toggle', array());
    }
    if (!empty($poll_options)) {
        while (list($option_id, $option_text) = each($poll_options)) {
            $template->assign_block_vars('poll_option_rows', array('POLL_OPTION' => str_replace('"', '&quot;', $option_text), 'S_POLL_OPTION_NUM' => $option_id));
        }
    }
    $template->assign_var_from_handle('POLLBOX', 'pollbody');
}
Exemple #6
0
function replyform($sid, $pid, $subject = '', $comment = '')
{
    global $userinfo;
    if (false === stripos($subject, 'Re:')) {
        $subject = 'Re: ' . substr($subject, 0, 81);
    }
    if (is_user()) {
        $user = '******' . URL::index('Your_Account') . '">' . $userinfo['username'] . '</a>';
    } else {
        $user = _ANONYMOUS . ' [ <a href="' . URL::index('Your_Account') . '">' . _NEWUSER . '</a> ]';
    }
    OpenTable();
    echo '<form action="' . URL::index() . '" method="post" name="postcomment" enctype="multipart/form-data" accept-charset="utf-8">
	<span class="option"><b>' . _YOURNAME . ':</b></span> ' . $user . '
	<br /><br /><span class="option"><b>' . _SUBJECT . ':</b></span><br />
	<input type="text" name="subject" size="50" maxlength="85" value="' . htmlprepare($subject) . '" /><br />
	<table border="0"><tr><td>
	<span class="option"><b>' . _UCOMMENT . ':</b></span><br />
	' . bbcode_table('comment', 'postcomment') . '
	<textarea wrap="virtual" cols="65" rows="10" name="comment">' . $comment . '</textarea></td><td valign="bottom">
	' . smilies_table('inline', 'comment', 'postcomment') . '
	</td></tr></table><br />
	<input type="hidden" name="pid" value="' . $pid . '" />
	<input type="hidden" name="sid" value="' . $sid . '" />
	<input type="submit" name="preview" value="' . _PREVIEW . '" /> <input type="submit" name="postreply" value="' . _OK . '" />
	</form>';
    CloseTable();
}
Exemple #7
0
</tr><tr>
	<td class="tableb" valign="top" width="40%">' . RCPT_NAME . '<br /></td>
	<td valign="top" class="tableb" width="60%">
		<input type="text" class="textinput" name="recipient_name" value="' . $recipient_name . '" style="width: 100%;" /><br />
	</td>
</tr><tr>
	<td class="tableb" valign="top" width="40%">' . RCPT_EMAIL . '<br /></td>
	<td valign="top" class="tableb" width="60%">
		<input type="text" class="textinput" name="recipient_email" value="' . $recipient_email . '" style="width: 100%;" /><br />
		' . $recipient_email_warning . '
	</td>
</tr><tr>
	<td class="tableh2" colspan="3"><b>' . GREETINGS . '</b></td>
</tr><tr>
	<td class="tableb" colspan="3">
		<input type="text" class="textinput" name="greetings" value="' . $greetings . '" style="width: 100%;" /><br />
	</td>
</tr><tr>
	<td class="tableh2" colspan="3"><b>' . MESSAGE . '</b></td>
</tr><tr>
	<td class="tableb" colspan="3" valign="top"><br />
		<textarea name="message" class="textinput" rows="8" cols="40" wrap="virtual" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" style="width: 100%;">' . $message . '</textarea><br /><br />
	</td>
</tr><tr>
	<td class="tableb" colspan="3" valign="top">' . smilies_table('onerow', 'message', 'post') . '</td>
</tr><tr>
	<td colspan="3" align="center" class="tablef"><input type="submit" class="button" value="' . E_TITLE . '" /></td>
</tr>
</form>';
endtable();
pagefooter();
Exemple #8
0
                        $template->assign_block_vars('switch_bbcode_checkbox', array());
                    } else {
                        $bbcode_status = $lang['BBCode_is_OFF'];
                    }
                    if ($mode == 'reply') {
                        $mode = 'post';
                    }
                    $s_hidden_fields = '<input type="hidden" name="folder" value="' . $folder . '" />';
                    $s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />';
                    if ($mode == 'edit') {
                        $s_hidden_fields .= '<input type="hidden" name="p" value="' . $privmsg_id . '" />';
                    }
                    if (!empty($privmsg_subject)) {
                        $privmsg_subject = htmlprepare($privmsg_subject);
                    }
                    $template->assign_vars(array('S_FOLDER' => $folder, 'S_PREVIEW_BOX' => $preview && !$error, 'SUBJECT' => $privmsg_subject, 'USERNAME' => !empty($to_username) ? htmlprepare($to_username) : '', 'MESSAGE' => isset($privmsg_message) ? $privmsg_message : '', 'HTML_ON' => false, 'BBCODE_ON' => $MAIN_CFG['private_messages']['allow_bbcode'] ? bbcode_table('message', 'post', 1) : '', 'SMILIES_ON' => $MAIN_CFG['private_messages']['allow_smilies'] ? smilies_table('inline', 'message', 'post') : '', 'SIG_ON' => $MAIN_CFG['private_messages']['allow_sig'] && $user_sig != '', 'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="' . URL::index('Forums&amp;file=faq&amp;mode=bbcode') . '" target="_phpbbcode">', '</a>'), 'L_SPELLCHECK' => $lang['Spellcheck'], 'L_CANCEL' => $lang['Cancel'], 'L_POST_A' => $pagetitle, 'L_FIND' => $lang['Find'], 'L_EMPTY_MESSAGE' => $lang['Empty_message'], 'S_HTML_CHECKED' => !$html_on ? ' checked="checked"' : '', 'S_BBCODE_CHECKED' => !$bbcode_on ? ' checked="checked"' : '', 'S_SMILIES_CHECKED' => !$smilies_on ? ' checked="checked"' : '', 'S_SIGNATURE_CHECKED' => $attach_sig ? ' checked="checked"' : '', 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields, 'U_SEARCH_USER' => URL::index('Forums&amp;file=search&amp;mode=searchuser&amp;popup=1', true, true), 'U_VIEW_FORUM' => URL::index()));
                    $template->set_handle('body', 'private_msgs/posting_body.html');
                    $template->display('body');
                    return;
                }
            }
        }
    }
}
//
// Update unread status
//
$db->sql_query("UPDATE " . $user_prefix . "_users\n\tSET user_unread_privmsg = user_unread_privmsg + user_new_privmsg, user_new_privmsg = 0, user_last_privmsg = " . $CPG_SESS['session_start'] . "\n\tWHERE user_id = " . $userinfo['user_id']);
$db->sql_query("UPDATE " . $prefix . "_bbprivmsgs\n\tSET privmsgs_type = " . PM_UNREAD_MAIL . "\n\tWHERE privmsgs_type = " . PM_NEW_MAIL . "\n\t\tAND privmsgs_to_userid = " . $userinfo['user_id']);
//
// Reset PM counters
Exemple #9
0
function write_review()
{
    global $sitename, $prefix, $user_prefix, $currentlang, $multilingual, $db, $ipcheck, $userinfo, $MAIN_CFG, $module_name;
    require_once 'header.php';
    $bb = $MAIN_CFG['Reviews']['allow_bbcode'] || can_admin(strtolower($module_name)) ? bbcode_table('text', 'writereview', 1) : '';
    OpenTable();
    echo '<b>' . _WRITEREVIEWFOR . " {$sitename}</b><br /><br />\n    <i>" . _ENTERINFO . '</i><br /><br />
    <form name="writereview" method="post" action="' . URL::index() . '">
    <b>' . _PRODUCTTITLE . ':</b><br />
    <input type="text" name="title" size="50" maxlength="150" /><br />
    <i>' . _NAMEPRODUCT . '</i><br /><br />';
    if ($multilingual) {
        echo '<b>' . _LANGUAGE . ': </b>' . lang_selectbox($currentlang, 'language');
    } else {
        echo '<input type="hidden" name="language" value="" />';
    }
    echo '<br /><br />' . $bb . '<br />';
    echo '<b>' . _REVIEW . ':</b><br />
    <div style="float:left;"><textarea name="text" rows="15" wrap="virtual" cols="60"></textarea></div><div style="float:left; margin-left:5px;">' . smilies_table('inline', 'text', 'writereview') . '</div><br />';
    if (can_admin(strtolower($module_name))) {
        echo '<span class="content">' . _PAGEBREAK . '</span><br />';
    }
    echo '<i>' . _CHECKREVIEW . '</i><br /><br />
    <b>' . _YOURNAME . ':</b><br />';
    if (is_user()) {
        if ($userinfo['name'] != '') {
            $sender_name = $userinfo['name'];
        } else {
            $sender_name = $userinfo['username'];
        }
        $email = $userinfo['user_email'];
    }
    echo '<input type="text" name="reviewer" size="41" maxlength="40" value="' . $sender_name . '" /><br />
    <i>' . _FULLNAMEREQ . '</i><br /><br />
    <b>' . _REMAIL . ':</b><br />
    <input type="text" name="email" size="40" maxlength="80" value="' . $email . '" /><br />
    <i>' . _REMAILREQ . '</i><br /><br />
    <b>' . _SCORE . '</b><br />
    <select name="score">
    <option value="10" />10</option>
    <option value="9" />9</option>
    <option value="8" />8</option>
    <option value="7" />7</option>
    <option value="6" />6</option>
    <option value="5" />5</option>
    <option value="4" />4</option>
    <option value="3" />3</option>
    <option value="2" />2</option>
    <option value="1" />1</option>
    </select>
    <i>' . _SELECTSCORE . '</i><br /><br />
    <b>' . _RELATEDLINK . ':</b><br />
    <input type="text" name="url" size="40" maxlength="100" value="" /><br />
    <i>' . _PRODUCTSITE . '</i><br /><br />
    <b>' . _LINKTITLE . ':</b><br />
    <input type="text" name="url_title" size="40" maxlength="50" /><br />
    <i>' . _LINKTITLEREQ . '</i><br /><br />';
    if (can_admin(strtolower($module_name))) {
        echo '<b>' . _RIMAGEFILE . ':</b><br />
    <input type="text" name="cover" size="40" maxlength="100" /><br />
    <i>' . _RIMAGEFILEREQ . '</i><br /><br />';
    }
    echo "<i>" . _CHECKINFO . '</i><br /><br />
    <input type="hidden" name="rop" value="preview_review" />
    <input type="submit" value="' . _PREVIEW . '" /> <input type="button" onclick="history.go(-1)" value="' . _CANCEL . '" /></form>';
    CloseTable();
}
Exemple #10
0
        $my_name = $my_email = $disabled = '';
        if (is_user()) {
            $my_name = $userinfo['username'];
            $my_email = $userinfo['user_email'];
            $disabled = ' readonly="readonly"';
        }
        echo '</table><br />
        <table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
        <tr><td class="catleft" colspan="2" align="center"><b><span class="gen">Leave a Comment</span></b></td></tr>';
        if (!is_user() && !$cfg_comment_anon) {
            echo '<tr><td class="row1" colspan="2" align="center"><span class="gen">' . _B_COMMENTS_REG . '</span></td></tr></table>';
        } else {
            echo '<form name="add_comment" action="' . getlink() . '" method="post" enctype="multipart/form-data" accept-charset="utf-8">
            <tr><td class="row1"><span class="gen">' . _NAME . '</span></td><td class="row2"><input type="text" name="comment_name" size="30" value="' . $my_name . '" maxlength="30"' . $disabled . ' /></td></tr>
            <tr><td class="row1"><span class="gen">' . _EMAIL . '</span></td><td class="row2"><input type="text" name="comment_email" size="30" value="' . $my_email . '" maxlength="255"' . $disabled . ' /></td></tr>
            <tr><td class="row1"><span class="gen">' . _B_COMMENTS_COMMENT . '</span>' . ($cfg_comment_limit >= 1 ? '<br />' . sprintf(_M_CHARS, $cfg_comment_limit) : '') . '</td><td class="row2"><textarea name="comment_text" wrap="virtual" cols="70" rows="7"></textarea>' . smilies_table('onerow', 'comment_text', 'add_comment') . '</td></tr>
            <tr><td class="catbottom" colspan="2" align="center" height="28">
            <input type="hidden" name="blog_id" value="' . $blog_id . '" />
            <input type="submit" name="post_comment" class="mainoption" value="' . _B_COMMENTS_POST . '" />
            </td></tr></form></table>';
        }
    }
} else {
    require_once 'header.php';
    $result = $db->sql_query("SELECT id, aid, title, timestamp FROM " . $prefix . "_blogs WHERE private='0' OR aid='" . $userinfo['username'] . "' ORDER BY timestamp DESC LIMIT 10");
    if ($db->sql_numrows($result) < 1) {
        echo '<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
        <tr><td class="row1" colspan="2" align="center"><span class="gen">' . sprintf(_ERROR_NONE_TO_DISPLAY, strtolower(_B_TITLE)) . '</span></td></tr>';
    } else {
        echo '<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
        <tr><td class="catleft" colspan="2" align="center"><b><span class="gen">' . _B_FRESH . '</span></b></td></tr>';
Exemple #11
0
    $user_sig = $MAIN_CFG['private_messages']['allow_bbcode'] ? decode_bbcode($user_sig, 1, false) : preg_replace('/\\:[0-9a-z\\:]+\\]/si', ']', $user_sig);
}
$private_message = $MAIN_CFG['private_messages']['allow_bbcode'] ? decode_bbcode($private_message, 1, false) : preg_replace('/\\:[0-9a-z\\:]+\\]/si', ']', $private_message);
$private_message = make_clickable($private_message);
if ($privmsg['privmsgs_attach_sig'] && $user_sig != '') {
    $private_message .= '<br /><br />_________________<br />' . make_clickable($user_sig);
}
if ($MAIN_CFG['private_messages']['allow_smilies'] && $privmsg['privmsgs_enable_smilies']) {
    $private_message = set_smilies($private_message);
}
//	  $private_message = str_replace("\n", '<br />', $private_message);
$template->assign_vars(array('MESSAGE_FROM' => $privmsg['username_1'], 'MESSAGE_TO' => $privmsg['username_2'], 'POST_SUBJECT' => $post_subject, 'POST_DATE' => L10NTime::date($MAIN_CFG['global']['dateformat'], $privmsg['privmsgs_date'], $userinfo['user_dst'], $userinfo['user_timezone']), 'MESSAGE' => $private_message, 'U_MESSAGE_FROM' => URL::index('Your_Account&amp;profile=' . $privmsg['username_1']), 'U_MESSAGE_TO' => URL::index('Your_Account&amp;profile=' . $privmsg['username_2'])));
// PM QUICK REPLY
//if ( $MAIN_CFG['private_messages']['ropm_quick_reply'] && $privmsg['privmsgs_from_userid'] != $userinfo['user_id'] )
if ($folder == 'inbox' && $MAIN_CFG['private_messages']['quick_reply']) {
    require_once 'includes/nbbcode.php';
    $last_msg = $privmsg['privmsgs_text'];
    $last_msg = '[quote="' . $privmsg['username_1'] . '"]' . $last_msg . '[/quote]';
    $last_msg = str_replace('\\', '\\\\', $last_msg);
    //'
    $last_msg = str_replace('"', '&quot;', $last_msg);
    $last_msg = str_replace(chr(13), '', $last_msg);
    $s_hidden_fields = '
<input type="hidden" name="folder" value="' . $folder . '" />
<input type="hidden" name="mode" value="post" />
<input type="hidden" name="username" value="' . $privmsg['username_1'] . '" />';
    $template->assign_block_vars('quickreply', array('POST_ACTION' => URL::index(), 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'SUBJECT' => (!preg_match('/^Re:/', $privmsg['privmsgs_subject']) ? 'Re: ' : '') . $privmsg['privmsgs_subject'], 'HTML_ON' => $MAIN_CFG['private_messages']['allow_html'], 'SMILIES_ON' => $MAIN_CFG['private_messages']['allow_smilies'] ? smilies_table('onerow', 'message', 'qreply') : '', 'BBCODE_ON' => $MAIN_CFG['private_messages']['allow_bbcode'] ? bbcode_table('message', 'qreply', 1) : '', 'SIG_ON' => $MAIN_CFG['private_messages']['allow_sig'] && $user_sig != '', 'S_HTML_CHECKED' => !$userinfo['user_allowhtml'] ? ' checked="checked"' : '', 'S_BBCODE_CHECKED' => !$userinfo['user_allowbbcode'] ? ' checked="checked"' : '', 'S_SMILIES_CHECKED' => !$userinfo['user_allowsmile'] ? ' checked="checked"' : '', 'S_QREPLY_MSG' => $last_msg, 'S_SIG_CHECKED' => $userinfo['user_sig'] != '' && $MAIN_CFG['private_messages']['allow_sig'] ? $userinfo['user_sig'] : ''));
    $template->assign_vars(array('L_MESSAGE' => $lang['Message'], 'L_OPTIONS' => $lang['Options'], 'L_QUOTE_SELECTED' => $lang['PMQR_QuoteSelelected'], 'L_NO_TEXT_SELECTED' => $lang['PMQR_QuoteSelelectedEmpty'], 'L_ERROR' => $lang['Error'], 'L_QUOTE_LAST_MESSAGE' => $lang['PMQR_Quick_quote'], 'L_QUICK_REPLY' => $lang['PMQR_Quick_Reply']));
}
$template->set_filenames(array('body' => 'private_msgs/read_body.html'));
$template->display('body');