コード例 #1
0
function pdp_get_bb_smileys($input, $val, $is_enabled, $show_smileys = true)
{
    global $locale;
    if (FUSION_VERSION == 7) {
        include_once INCLUDES . 'bbcode_include.php';
        return display_bbcodes('98%', $input) . ($is_enabled ? '<div><label><input type="checkbox" name="disable_smileys" value="' . $val . '"' . ($val == '0' ? ' checked="checked"' : '') . ' /> ' . $locale['PDP041'] . '</label></div>' : '');
    } else {
        return '
<input type="button" value="b" class="button" style="font-weight:bold;"
	onclick="addText(\'' . $input . '\', \'[b]\', \'[/b]\');" />
<input type="button" value="i" class="button" style="font-style:italic;"
	onclick="addText(\'' . $input . '\', \'[i]\', \'[/i]\');" />
<input type="button" value="u" class="button" style="text-decoration:underline;"
	onclick="addText(\'' . $input . '\', \'[u]\', \'[/u]\');" />
<input type="button" value="url" class="button"
	onclick="addText(\'' . $input . '\', \'[url]\', \'[/url]\');" />
<input type="button" value="mail" class="button"
	onclick="addText(\'' . $input . '\', \'[mail]\', \'[/mail]\');" />
<input type="button" value="img" class="button"
	onclick="addText(\'' . $input . '\', \'[img]\', \'[/img]\');" />
<input type="button" value="center" class="button"
	onclick="addText(\'' . $input . '\', \'[center]\', \'[/center]\');" />
<input type="button" value="small" class="button"
	onclick="addText(\'' . $input . '\', \'[small]\', \'[/small]\');" />
<input type="button" value="code" class="button"
	onclick="addText(\'' . $input . '\', \'[code]\', \'[/code]\');" />
<input type="button" value="quote" class="button"
	onclick="addText(\'' . $input . '\', \'[quote]\', \'[/quote]\');" />' . ($show_smileys ? '<div>' . displaysmileys($input) . '</div>' : '') . ($is_enabled ? '<div><label><input type="checkbox" name="disable_smileys" value="' . $val . '"' . ($val == '0' ? ' checked="checked"' : '') . ' /> ' . $locale['PDP041'] . '</label></div>' : '');
    }
}
コード例 #2
0
function showcomments($ctype, $cdb, $ccol, $cid, $clink = "")
{
    global $settings, $userdata, $locale;
    include LOCALE . LOCALESET . "comments.php";
    require_once INCLUDES . "bbcode_include.php";
    add_to_head("<script type='text/javascript' src='" . INCLUDES . "comments_include/comments.js'></script>");
    add_to_head("<script type='text/javascript'>\n            var ctype = '" . $ctype . "';\n            if (ctype == 'MG') {\n                var cid = window.cidas;\n            } else {\n                var cid = '" . $cid . "';\n            }\n            var basedir = '" . BASEDIR . "';\n\t\t\tvar locale_noc = '" . $locale['c101'] . "';\n\t\t\tvar locale_edit = '" . $locale['c108'] . "';\n\t\t\tvar locale_del = '" . $locale['c109'] . "';\n    </script>");
    echo "<br /><br />";
    opentable($locale['c100']);
    echo "<div id='comments_load' style='display:none;text-align:center;'><img src='" . INCLUDES . "comments_include/load.gif' alt='' style='border:0;' /></div><div id='comments'></div>";
    closetable();
    echo "<br /><br />";
    opentable($locale['c102']);
    if (iMEMBER) {
        echo "<div align='center'>";
        echo "<a id='edit_comment' name='edit_comment'></a>";
        echo "<form name='comment_form' method='post' action='#'>";
        echo "<input type='hidden' name='comment_name' value='" . $userdata['user_id'] . "' />";
        echo "<input type='hidden' name='cid' value='" . $cid . "' />";
        echo "<input type='hidden' name='ctype' value='" . $ctype . "' />";
        echo "<input type='hidden' name='edited_id' value='' />";
        echo "<input type='hidden' name='edited_id' value='' />";
        echo "<textarea name='comment_message' cols='70' rows='6' class='textbox' style='width:360px'></textarea><br />";
        echo "<div align='center'>" . display_bbcodes("360px", "comment_message", "comment_form") . "</div>";
        echo "<input type='submit' name='post_comment' value='" . $locale['c102'] . "' class='button' /> ";
        echo "<input type='submit' name='edit_comment' value='" . $locale['c103'] . "' class='button' /> ";
        echo "</form>";
        echo "<div id='comment_load' style='display:none;text-align:center;height:140px;'><img src='" . INCLUDES . "comments_include/load.gif' alt='' style='border:0;margin-top:50px;' /></div>";
        echo "<br />";
        echo "</div>";
    } else {
        echo "<div style='text-align:center'>" . $locale['c105'] . "</div><br />";
    }
    closetable();
    echo "<div style='text-align:center;width:100%;'>AL jQ comments <a href='http://fusion.annetlab.tk'>Fusion @ AnnetLab</a> &copy; 2011-2012</div>";
}
コード例 #3
0
function showcomments($ctype, $cdb, $ccol, $cid, $clink)
{
    global $settings, $locale, $userdata, $aidlink;
    $link = FUSION_SELF . (FUSION_QUERY ? "?" . FUSION_QUERY : "");
    $link = preg_replace("^(&amp;|\\?)c_action=(edit|delete)&amp;comment_id=\\d*^", "", $link);
    if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "delete") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
        if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_name='" . $userdata['user_id'] . "'")) {
            $result = dbquery("DELETE FROM " . DB_COMMENTS . " WHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : " AND comment_name='" . $userdata['user_id'] . "'"));
        }
        redirect($clink);
    }
    if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) {
        if (iMEMBER) {
            $comment_name = $userdata['user_id'];
        } elseif ($settings['guestposts'] == "1") {
            $comment_name = trim(stripinput($_POST['comment_name']));
            $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
            if (isnum($comment_name)) {
                $comment_name = "";
            }
            include_once INCLUDES . "securimage/securimage.php";
            $securimage = new Securimage();
            if (!isset($_POST['com_captcha_code']) || $securimage->check($_POST['com_captcha_code']) == false) {
                redirect($link);
            }
        }
        $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
        if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
            $comment_updated = false;
            if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_name='" . $userdata['user_id'] . "'")) {
                if ($comment_message) {
                    $result = dbquery("UPDATE " . DB_COMMENTS . " SET comment_message='{$comment_message}' WHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : " AND comment_name='" . $userdata['user_id'] . "'"));
                    $comment_updated = true;
                }
            }
            if ($comment_updated) {
                $c_start = (ceil(dbcount("(comment_id)", DB_COMMENTS, "comment_id<='" . $_GET['comment_id'] . "' AND comment_item_id='" . $cid . "' AND comment_type='" . $ctype . "'") / 10) - 1) * 10;
            }
            redirect($clink . "&amp;rstart=" . (isset($c_start) && isnum($c_start) ? $c_start : ""));
        } else {
            if (!dbcount("(" . $ccol . ")", $cdb, $ccol . "='" . $cid . "'")) {
                redirect(BASEDIR . "index.php");
            }
            if ($comment_name && $comment_message) {
                require_once INCLUDES . "flood_include.php";
                if (!flood_control("comment_datestamp", DB_COMMENTS, "comment_ip='" . USER_IP . "'")) {
                    $result = dbquery("INSERT INTO " . DB_COMMENTS . " (comment_item_id, comment_type, comment_name, comment_message, comment_datestamp, comment_ip) VALUES ('{$cid}', '{$ctype}', '{$comment_name}', '{$comment_message}', '" . time() . "', '" . USER_IP . "')");
                }
            }
            $c_start = (ceil(dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $cid . "' AND comment_type='" . $ctype . "'") / 10) - 1) * 10;
            redirect($clink . "&amp;rstart=" . $c_start);
        }
    }
    opentable($locale['c100']);
    echo "<a id='comments' name='comments'></a>";
    $c_rows = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='{$cid}' AND comment_type='{$ctype}'");
    if (!isset($_GET['c_start']) || !isnum($_GET['c_start'])) {
        $_GET['c_start'] = 0;
    }
    $result = dbquery("SELECT tcm.*,user_name FROM " . DB_COMMENTS . " tcm\n\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\n\t\tWHERE comment_item_id='{$cid}' AND comment_type='{$ctype}'\n\t\tORDER BY comment_datestamp ASC LIMIT " . $_GET['c_start'] . ",10");
    if (dbrows($result)) {
        $i = $_GET['c_start'] + 1;
        if ($c_rows > 10) {
            echo "<div style='text-align:center;margin-bottom:5px;'>" . makecommentnav($_GET['c_start'], 10, $c_rows, 3, $clink . "&amp;") . "</div>\n";
        }
        while ($data = dbarray($result)) {
            echo "<div class='tbl2'>\n";
            if (iADMIN && checkrights("C") || iMEMBER && $data['comment_name'] == $userdata['user_id'] && isset($data['user_name'])) {
                echo "<div style='float:right' class='comment_actions'><!--comment_actions-->\n<a href='" . FUSION_REQUEST . "&amp;c_action=edit&amp;comment_id=" . $data['comment_id'] . "#edit_comment'>" . $locale['c108'] . "</a> |\n";
                echo "<a href='" . FUSION_REQUEST . "&amp;c_action=delete&amp;comment_id=" . $data['comment_id'] . "'>" . $locale['c109'] . "</a>\n</div>\n";
            }
            echo "<a href='" . FUSION_REQUEST . "#c" . $data['comment_id'] . "' id='c" . $data['comment_id'] . "' name='c" . $data['comment_id'] . "'>#" . $i . "</a> | ";
            if ($data['user_name']) {
                echo "<span class='comment-name'><a href='" . BASEDIR . "profile.php?lookup=" . $data['comment_name'] . "'>" . $data['user_name'] . "</a></span>\n";
            } else {
                echo "<span class='comment-name'>" . $data['comment_name'] . "</span>\n";
            }
            echo "<span class='small'>" . $locale['global_071'] . showdate("longdate", $data['comment_datestamp']) . "</span>\n";
            echo "</div>\n<div class='tbl1 comment_message'><!--comment_message-->" . nl2br(parseubb(parsesmileys($data['comment_message']))) . "</div>\n";
            $i++;
        }
        if (iADMIN && checkrights("C")) {
            echo "<div align='right' class='tbl2'><a href='" . ADMIN . "comments.php" . $aidlink . "&amp;ctype={$ctype}&amp;cid={$cid}'>" . $locale['c106'] . "</a></div>\n";
        }
        if ($c_rows > 10) {
            echo "<div style='text-align:center;margin-top:5px;'>" . makecommentnav($_GET['c_start'], 10, $c_rows, 3, $clink . "&amp;") . "</div>\n";
        }
    } else {
        echo $locale['c101'] . "\n";
    }
    closetable();
    opentable($locale['c102']);
    if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
        $eresult = dbquery("SELECT tcm.*,user_name FROM " . DB_COMMENTS . " tcm\n\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\n\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "' AND comment_item_id='" . $cid . "' AND comment_type='" . $ctype . "'");
        if (dbrows($eresult)) {
            $edata = dbarray($eresult);
            if (iADMIN && checkrights("C") || iMEMBER && $edata['comment_name'] == $userdata['user_id'] && isset($edata['user_name'])) {
                $clink .= "&amp;c_action=edit&amp;comment_id=" . $edata['comment_id'];
                $comment_message = $edata['comment_message'];
            }
        } else {
            $comment_message = "";
        }
    } else {
        $comment_message = "";
    }
    if (iMEMBER || $settings['guestposts'] == "1") {
        require_once INCLUDES . "bbcode_include.php";
        echo "<a id='edit_comment' name='edit_comment'></a>\n";
        echo "<form name='inputform' method='post' action='" . $clink . "'>\n";
        if (iGUEST) {
            echo "<div align='center' class='tbl'>\n" . $locale['c104'] . "<br />\n";
            echo "<input type='text' name='comment_name' maxlength='30' class='textbox' style='width:360px' />\n";
            echo "</div>\n";
        }
        echo "<div align='center' class='tbl'>\n";
        echo "<textarea name='comment_message' cols='70' rows='6' class='textbox' style='width:360px'>" . $comment_message . "</textarea><br />\n";
        echo display_bbcodes("360px", "comment_message");
        if (iGUEST) {
            echo $locale['global_158'] . "<br />\n";
            echo "<img id='com_captcha' src='" . INCLUDES . "securimage/securimage_show.php' alt='' /><br />\n";
            echo "<a href='" . INCLUDES . "securimage/securimage_play.php'><img src='" . INCLUDES . "securimage/images/audio_icon.gif' alt='' class='tbl-border' style='margin-bottom:1px' /></a>\n";
            echo "<a href='#' onclick=\"document.getElementById('com_captcha').src = '" . INCLUDES . "securimage/securimage_show.php?sid=' + Math.random(); return false\"><img src='" . INCLUDES . "securimage/images/refresh.gif' alt='' class='tbl-border' /></a><br />\n";
            echo $locale['global_159'] . "<br />\n<input type='text' name='com_captcha_code' class='textbox' style='width:100px' />\n";
        }
        echo "<br />\n<input type='submit' name='post_comment' value='" . ($comment_message ? $locale['c103'] : $locale['c102']) . "' class='button' />\n";
        echo "</div>\n</form>\n";
    } else {
        echo $locale['c105'] . "\n";
    }
    closetable();
}
コード例 #4
0
ファイル: form_textarea.php プロジェクト: WuChEn/PHP-Fusion
function form_textarea($title = FALSE, $input_name, $input_id, $input_value = FALSE, $array = FALSE)
{
    global $userdata;
    // for editor
    $title2 = isset($title) && !empty($title) ? stripinput($title) : ucfirst(strtolower(str_replace("_", " ", $input_name)));
    $input_name = isset($input_name) && !empty($input_name) ? stripinput($input_name) : "";
    $input_id = isset($input_id) && !empty($input_id) ? stripinput($input_id) : "";
    if (!is_array($array)) {
        $required = 0;
        $safemode = 0;
        $deactivate = "";
        $width = "100%";
        $height = "80px";
        $editor = 0;
        $placeholder = "";
        $inline = '';
        $form_name = 'input_form';
        $bbcode = 0;
        $error_text = '';
        $class = '';
    } else {
        $required = array_key_exists('required', $array) && $array['required'] == 1 ? 1 : 0;
        $safemode = array_key_exists('safemode', $array) && $array['safemode'] == 1 ? 1 : 0;
        $placeholder = array_key_exists('placeholder', $array) ? $array['placeholder'] : "";
        $deactivate = array_key_exists('deactivate', $array) ? $array['deactivate'] : "";
        $bbcode = array_key_exists('bbcode', $array) && $array['bbcode'] == 1 ? 1 : 0;
        $editor = array_key_exists('editor', $array) ? $array['editor'] : "";
        $width = array_key_exists('width', $array) ? $array['width'] : "100%";
        $height = array_key_exists('height', $array) ? $array['height'] : "80";
        $inline = array_key_exists("inline", $array) ? 1 : 0;
        $form_name = array_key_exists('form_name', $array) ? $array['form_name'] : 'input_form';
        $error_text = array_key_exists("error_text", $array) ? $array['error_text'] : "";
        $class = array_key_exists("class", $array) && $array['class'] ? $array['class'] : '';
    }
    $input_value = phpentities(stripslashes($input_value));
    $input_value = str_replace("<br />", "", $input_value);
    if ($bbcode) {
        require_once INCLUDES . "bbcode_include.php";
    }
    $html = "";
    $html .= "<div id='{$input_id}-field' class='form-group m-b-0 " . $class . "'>\n";
    $html .= $title ? "<label class='control-label " . ($inline ? "col-xs-12 col-sm-3 col-md-3 col-lg-3" : '') . "' for='{$input_id}'>{$title} " . ($required == 1 ? "<span class='required'>*</span>" : '') . "</label>\n" : '';
    $html .= $inline ? "<div class='col-xs-12 col-sm-9 col-md-9 col-lg-9'>\n" : "";
    $html .= $bbcode ? "" . display_bbcodes('90%', $input_name, $form_name) . "" : '';
    $html .= "<textarea name='{$input_name}' style='width:100%; min-height:100px;' class='form-control textbox' placeholder='{$placeholder}' id='{$input_id}' " . ($deactivate == "1" && isnum($deactivate) ? "readonly" : "") . ">{$input_value}</textarea>\n";
    $html .= "<div id='{$input_id}-help' class='display-inline-block'></div>";
    $html .= $inline ? "</div>\n" : "";
    $html .= "</div>\n";
    $html .= "<input type='hidden' name='def[{$input_name}]' value='[type=textarea],[title={$title2}],[id={$input_id}],[required={$required}],[safemode={$safemode}]" . ($error_text ? ",[error_text={$error_text}]" : '') . "' readonly />";
    // Editor Parse Configurations.
    if ($editor) {
        $result = dbquery("SELECT * FROM " . DB_EDITOR . " WHERE " . groupaccess('editor_access') . " AND editor_enable='1' ORDER BY editor_access DESC LIMIT 1");
        if (dbrows($result) > 0) {
            $data = dbarray($result);
            if (!defined('text_editor_on')) {
                define('text_editor_on', TRUE);
                // load editor js
                add_to_head("<script src='" . DYNAMICS . "assets/editor/development/jquery.sceditor.bbcode.js'></script>\n");
                // load editor theme
                $editor_theme = DYNAMICS . "assets/editor/development/themes/css/monocons.css";
                if (file_exists(DYNAMICS . "assets/editor/development/themes/css/" . $data['editor_theme'] . "")) {
                    $editor_theme = DYNAMICS . "assets/editor/development/themes/css/" . $data['editor_theme'];
                }
                add_to_head("<link rel='stylesheet' href='{$editor_theme}' type='text/css' media='all' />\n");
                // load smileys;
                $editor_smiley = cache_editor_smiley();
                // load editor bbcode settings;
                $editor_config = get_editor_buttons($data['editor_name']);
                // initialize the editor
                add_to_jquery("\n                        \$('#{$input_id}').sceditor({\n                        plugins: 'bbcode',\n                        id: '{$input_id}-editor',\n                        height : '300',\n                        width : '{$width}',\n                        //toolbar: '{$editor_config}',\n                        autoUpdate: true,\n                        style: '{$editor_theme}',\n                        {$editor_smiley}\n                        });\n                    ");
            }
            /*
             * width: '720',
             * height: '300'
             *                         resizeEnabled: false,
             */
        }
    }
    // endif editor config
    // Api for Adding Custom BBCodes - Example
    /*
    add_to_jquery("
       $.sceditor.plugins.bbcode.bbcode.set('spoiler', {
            tags: {
                'div': {
                    'class': ['spoiler']
                }
            },
            format: '[spoiler]{0}[/spoiler]',
            html: '<div class=\"spoiler\">{0}</div>'
       });
        ");
    */
    return $html;
}
コード例 #5
0
ファイル: form_textarea.php プロジェクト: knapnet/PHP-Fusion
function form_textarea($input_name, $label = '', $input_value = '', array $options = array())
{
    global $locale, $defender, $userdata;
    // for editor
    $title = $label ? stripinput($label) : ucfirst(strtolower(str_replace("_", " ", $input_name)));
    $input_name = isset($input_name) && !empty($input_name) ? stripinput($input_name) : "";
    require_once INCLUDES . "bbcode_include.php";
    require_once INCLUDES . "html_buttons_include.php";
    include_once LOCALE . LOCALESET . "admin/html_buttons.php";
    include_once LOCALE . LOCALESET . "error.php";
    if (!empty($options['bbcode'])) {
        $options['type'] = "bbcode";
    } elseif (!empty($options['html'])) {
        $options['type'] = "html";
    }
    $options = array('input_id' => !empty($options['input_id']) ? $options['input_id'] : $input_name, "type" => !empty($options['type']) && in_array($options['type'], array("html", "bbcode", "tinymce")) ? $options['type'] : "", 'required' => !empty($options['required']) && $options['required'] == 1 ? '1' : '0', 'placeholder' => !empty($options['placeholder']) ? $options['placeholder'] : '', 'deactivate' => !empty($options['deactivate']) && $options['deactivate'] == 1 ? '1' : '', 'width' => !empty($options['width']) ? $options['width'] : '100%', 'height' => !empty($options['height']) ? $options['height'] : '80px', 'class' => !empty($options['class']) ? $options['class'] : '', 'inline' => !empty($options['inline']) && $options['inline'] == 1 ? '1' : '0', 'length' => !empty($options['length']) ? $options['length'] : '200', 'error_text' => !empty($options['error_text']) ? $options['error_text'] : $locale['error_input_default'], 'safemode' => !empty($options['safemode']) && $options['safemode'] == 1 ? '1' : '0', 'form_name' => !empty($options['form_name']) ? $options['form_name'] : 'input_form', 'tinymce' => !empty($options['tinymce']) && in_array($options['tinymce'], array(TRUE, 'simple', 'advanced')) ? $options['tinymce'] : "simple", 'no_resize' => !empty($options['no_resize']) && $options['no_resize'] == '1' ? '1' : '0', 'autosize' => !empty($options['autosize']) && $options['autosize'] == 1 ? '1' : '0', 'preview' => !empty($options['preview']) && $options['preview'] == TRUE ? TRUE : FALSE, 'path' => !empty($options['path']) && $options['path'] ? $options['path'] : IMAGES, 'maxlength' => !empty($options['maxlength']) && isnum($options['maxlength']) ? $options['maxlength'] : '', 'tip' => !empty($options['tip']) ? $options['tip'] : '');
    if ($options['type'] == "tinymce") {
        $tinymce_list = array();
        $image_list = makefilelist(IMAGES, ".|..|");
        $image_filter = array('png', 'PNG', 'bmp', 'BMP', 'jpg', 'JPG', 'jpeg', 'gif', 'GIF', 'tiff', 'TIFF');
        foreach ($image_list as $image_name) {
            $image_1 = explode('.', $image_name);
            $last_str = count($image_1) - 1;
            if (in_array($image_1[$last_str], $image_filter)) {
                $tinymce_list[] = array('title' => $image_name, 'value' => IMAGES . $image_name);
            }
        }
        $tinymce_list = json_encode($tinymce_list);
        $tinymce_smiley_vars = "";
        if (!defined('tinymce')) {
            add_to_head("<style type='text/css'>.mceIframeContainer iframe{width:100%!important; height:30px;}</style>");
            add_to_footer("<script type='text/javascript' src='" . INCLUDES . "jscripts/tinymce/tinymce.min.js'></script>");
            define('tinymce', TRUE);
            // PHP-Fusion Parse Cache Smileys
            $smileys = cache_smileys();
            $tinymce_smiley_vars = "";
            if (!empty($smileys)) {
                $tinymce_smiley_vars = "var shortcuts = {\n";
                foreach ($smileys as $params) {
                    $tinymce_smiley_vars .= "'" . strtolower($params['smiley_code']) . "' : '<img alt=\"" . $params['smiley_text'] . "\" src=\"" . IMAGES . "smiley/" . $params['smiley_image'] . "\"/>',\n";
                }
                $tinymce_smiley_vars .= "};\n";
                $tinymce_smiley_vars .= "\n\t\t\t\ted.on('keyup load', function(e){\n\t\t\t\t\tvar marker = tinymce.activeEditor.selection.getBookmark();\n\t\t\t\t\t// Store editor contents\n\t\t\t\t\tvar content = tinymce.activeEditor.getContent({'format':'raw'});\n\t\t\t\t\t// Loop through all shortcuts\n\t\t\t\t\tfor(var key in shortcuts){\n\t\t\t\t\t\t// Check if the editor html contains the looped shortcut\n\t\t\t\t\t\tif(content.toLowerCase().indexOf(key) != -1) {\n\t\t\t\t\t\t\t// Escaping special characters to be able to use the shortcuts in regular expression\n\t\t\t\t\t\t\tvar k = key.replace(/[<>*()?']/ig, \"\\\$&\");\n\t\t\t\t\t\t\ttinymce.activeEditor.setContent(content.replace(k, shortcuts[key]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Now put cursor back where it was\n\t\t\t\t\ttinymce.activeEditor.selection.moveToBookmark(marker);\n\t\t\t\t});\n\t\t\t\t";
            }
        }
        // Mode switching for TinyMCE
        switch ($options['tinymce']) {
            case 'advanced':
                add_to_jquery("\n                tinymce.init({\n                selector: '#" . $options['input_id'] . "',\n                theme: 'modern',\n                entity_encoding : 'raw',\n                width: '100%',\n                height: 300,\n                plugins: [\n                    'advlist autolink autoresize link image lists charmap print preview hr anchor pagebreak spellchecker',\n                    'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',\n                    'save table contextmenu directionality template paste textcolor'\n                ],\n                image_list: {$tinymce_list},\n                content_css: '" . THEMES . "admin_templates/" . fusion_get_settings("admin_theme") . "/acp_styles.css',\n                toolbar1: 'insertfile undo redo | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | newdocument fullscreen preview cut copy paste pastetext spellchecker searchreplace code',\n                toolbar2: 'styleselect formatselect removeformat | fontselect fontsizeselect bold italic underline strikethrough subscript superscript blockquote | forecolor backcolor',\n                toolbar3: 'hr pagebreak insertdatetime | link unlink anchor | image media | table charmap visualchars visualblocks emoticons',\n                image_advtab: true,\n                style_formats: [\n                    {title: 'Bold text', inline: 'b'},\n                    {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},\n                    {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},\n                    {title: 'Example 1', inline: 'span', classes: 'example1'},\n                    {title: 'Example 2', inline: 'span', classes: 'example2'},\n                    {title: 'Table styles'},\n                    {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}\n                ],\n                setup: function(ed) {\n    \t\t\t\t\t// add tabkey listener\n    \t\t\t\t\ted.on('keydown', function(event) {\n        \t\t\t\t\tif (event.keyCode == 9) { // tab pressed\n          \t\t\t\t\t\tif (event.shiftKey) { ed.execCommand('Outdent'); } else { ed.execCommand('Indent'); }\n          \t\t\t\t\t\tevent.preventDefault();\n          \t\t\t\t\t\treturn false;\n        \t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// auto smileys parsing\n\t\t\t\t\t\t" . $tinymce_smiley_vars . "\n\t\t\t\t}\n            });\n        ");
                break;
            case 'simple':
                add_to_jquery("\n                tinymce.init({\n                selector: '#" . $options['input_id'] . "',\n                theme: 'modern',\n                menubar: false,\n                statusbar: false,\n                content_css: '" . THEMES . "/templates/tinymce.css',\n                image_list: {$tinymce_list},\n                plugins: [\n                    'advlist autolink autoresize link lists charmap print preview hr anchor pagebreak spellchecker',\n                    'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',\n                    'contextmenu directionality template paste bbcode autoresize'\n                ],\n                height: 30,\n                image_advtab: true,\n                toolbar1: 'undo redo | bold italic underline | bullist numlist blockquote | hr media | fullscreen',\n                entity_encoding : 'raw',\n                language: '" . $locale['tinymce'] . "',\n                object_resizing: false,\n                resize: false,\n                relative_urls: false,\n                setup: function(ed) {\n    \t\t\t\t\t// add tabkey listener\n    \t\t\t\t\ted.on('keydown', function(event) {\n        \t\t\t\t\tif (event.keyCode == 9) { // tab pressed\n          \t\t\t\t\t\tif (event.shiftKey) { ed.execCommand('Outdent'); } else { ed.execCommand('Indent'); }\n          \t\t\t\t\t\tevent.preventDefault();\n          \t\t\t\t\t\treturn false;\n        \t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// auto smileys parsing\n\t\t\t\t\t\t" . $tinymce_smiley_vars . "\n\t\t\t\t}\n                });\n                ");
                add_to_jquery("\n\t\t\t\t\$('#inject').bind('click', function() {\n\t\t\t\t\ttinyMCE.activeEditor.execCommand(\"mceInsertContent\", true, '[b]I am injecting in stuff..[/b]');\n\t\t\t\t\t});\n\t\t\t\t");
                break;
            case 'default':
                add_to_jquery("\n                tinymce.init({\n                selector: '#" . $options['input_id'] . "',\n                theme: 'modern',\n                entity_encoding : 'raw',\n                language:'" . $locale['tinymce'] . "',\n                setup: function(ed) {\n    \t\t\t\t\t// add tabkey listener\n    \t\t\t\t\ted.on('keydown', function(event) {\n        \t\t\t\t\tif (event.keyCode == 9) { // tab pressed\n          \t\t\t\t\t\tif (event.shiftKey) { ed.execCommand('Outdent'); } else { ed.execCommand('Indent'); }\n          \t\t\t\t\t\tevent.preventDefault();\n          \t\t\t\t\t\treturn false;\n        \t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// auto smileys parsing\n\t\t\t\t\t\t" . $tinymce_smiley_vars . "\n\t\t\t\t}\n                });\n                ");
                break;
        }
    } else {
        if (!defined('autogrow') && $options['autosize']) {
            define('autogrow', TRUE);
            add_to_footer("<script src='" . DYNAMICS . "assets/autosize/jquery.autosize.min.js'></script>");
        }
        if ($options['autosize']) {
            add_to_jquery("\n\t\t    \$('#" . $options['input_id'] . "').autosize();\n\t\t    ");
        }
    }
    if ($input_value !== '') {
        $input_value = html_entity_decode(stripslashes($input_value), ENT_QUOTES, $locale['charset']);
        $input_value = str_replace("<br />", "", $input_value);
    }
    $error_class = "";
    if ($defender->inputHasError($input_name)) {
        $error_class = "has-error ";
        if (!empty($options['error_text'])) {
            $new_error_text = $defender->getErrorText($input_name);
            if (!empty($new_error_text)) {
                $options['error_text'] = $new_error_text;
            }
            addNotice("danger", "<strong>{$title}</strong> - " . $options['error_text']);
        }
    }
    $html = "<div id='" . $options['input_id'] . "-field' class='form-group " . $error_class . $options['class'] . "' " . ($options['inline'] && $options['width'] && !$label ? "style='width: " . $options['width'] . " !important;'" : '') . ">\n";
    $html .= $label ? "<label class='control-label " . ($options['inline'] ? "col-xs-12 col-sm-3 col-md-3 col-lg-3 p-l-0" : '') . "' for='" . $options['input_id'] . "'>{$label} " . ($options['required'] == 1 ? "<span class='required'>*</span>" : '') . " " . ($options['tip'] ? "<i class='pointer fa fa-question-circle' title='" . $options['tip'] . "'></i>" : '') . "</label>\n" : '';
    $html .= $options['inline'] ? "<div class='col-xs-12 " . ($label ? "col-sm-9 col-md-9 col-lg-9 p-r-0" : "col-sm-12 p-l-0") . "'>\n" : "";
    $tab_active = 0;
    $tab_title = array();
    if ($options['preview'] && ($options['type'] == "html" || $options['type'] == "bbcode")) {
        $tab_title['title'][] = $locale['preview'];
        $tab_title['id'][] = "prw-" . $options['input_id'];
        $tab_title['icon'][] = '';
        $tab_title['title'][] = $locale['texts'];
        $tab_title['id'][] = "txt-" . $options['input_id'];
        $tab_title['icon'][] = '';
        $tab_active = tab_active($tab_title, 1);
        $html .= opentab($tab_title, $tab_active, $options['input_id'] . "-link", "", "editor-wrapper");
        $html .= opentabbody($tab_title['title'][1], "txt-" . $options['input_id'], $tab_active);
    }
    $html .= $options['type'] == "html" || $options['type'] == "bbcode" ? "<div class='panel panel-default panel-txtarea m-b-0' " . ($options['preview'] ? "style='border-top:0 !important; border-radius:0 !important;'" : '') . ">\n<div class='panel-heading clearfix' style='padding-bottom:0 !important;'>\n" : '';
    if ($options['type'] == "bbcode" && $options['form_name']) {
        $html .= display_bbcodes('90%', $input_name, $options['form_name']);
    } elseif ($options['type'] == "html" && $options['form_name']) {
        $html .= display_html($options['form_name'], $input_name, TRUE, TRUE, TRUE, $options['path']);
    }
    $html .= $options['type'] == "html" || $options['type'] == "bbcode" ? "</div>\n<div class='panel-body p-0'>\n" : '';
    $html .= "<textarea name='{$input_name}' style='width:100%; height:" . $options['height'] . "; " . ($options['no_resize'] ? 'resize: none;' : '') . "' class='form-control p-15 m-0 " . $options['class'] . " " . ($options['autosize'] ? 'animated-height' : '') . " " . ($options['type'] == "html" || $options['type'] == "bbcode" ? "no-shadow no-border" : '') . " textbox ' placeholder='" . $options['placeholder'] . "' id='" . $options['input_id'] . "' " . ($options['deactivate'] ? 'readonly' : '') . ($options['maxlength'] ? "maxlength='" . $options['maxlength'] . "'" : '') . ">" . $input_value . "</textarea>\n";
    if ($options['type'] == "html" || $options['type'] == "bbcode") {
        $html .= "</div>\n<div class='panel-footer clearfix'>\n";
        $html .= "<div class='overflow-hide'><small>" . $locale['word_count'] . ": <span id='" . $options['input_id'] . "-wordcount'></span></small></div>";
        add_to_jquery("\n\t\tvar init_str = \$('#" . $options['input_id'] . "').val().replace(/<[^>]+>/ig, '').replace(/\\n/g,'').replace(/ /g, '').length;\n\t\t\$('#" . $options['input_id'] . "-wordcount').text(init_str);\n\t\t\$('#" . $options['input_id'] . "').on('input propertychange paste', function() {\n\t\tvar str = \$(this).val().replace(/<[^>]+>/ig, '').replace(/\\n/g,'').replace(/ /g, '').length;\n\t\t\$('#" . $options['input_id'] . "-wordcount').text(str);\n\t\t});\n\t\t");
        $html .= "</div>\n</div>\n";
    }
    if ($options['preview'] && ($options['type'] == "bbcode" || $options['type'] == "html")) {
        $html .= closetabbody();
        $html .= opentabbody($tab_title['title'][0], "prw-" . $options['input_id'] . "", $tab_active);
        $html .= "No Result";
        $html .= closetabbody();
        $html .= closetab();
        add_to_jquery("\n\t\t// preview syntax\n\t\tvar form = \$('#" . $options['form_name'] . "');\n\t\t\$('#tab-prw-" . $options['input_id'] . "').bind('click',function(){\n\t\tvar text = \$('#" . $options['input_id'] . "').val();\n\t\tvar format = '" . ($options['type'] == "bbcode" ? 'bbcode' : 'html') . "';\n\t\tvar data = {\n\t\t\t" . (defined('ADMIN_PANEL') ? "'mode': 'admin', " : "") . "\n\t\t\t'text' : text,\n\t\t\t'editor' : format,\n\t\t\t'url' : '" . $_SERVER['REQUEST_URI'] . "',\n\t\t};\n\t\tvar sendData = form.serialize() + '&' + \$.param(data);\n\t\t\$.ajax({\n\t\t\turl: '" . INCLUDES . "dynamics/assets/preview/preview.ajax.php',\n\t\t\ttype: 'POST',\n\t\t\tdataType: 'html',\n\t\t\tdata : sendData,\n\t\t\tsuccess: function(result){\n\t\t\t//console.log(result);\n\t\t\t\$('#prw-" . $options['input_id'] . "').html(result);\n\t\t\t},\n\t\t\terror: function(result) {\n\t\t\t\tnew PNotify({\n\t\t\t\t\ttitle: '" . $locale['error_preview'] . "',\n\t\t\t\t\ttext: '" . $locale['error_preview_text'] . "',\n\t\t\t\t\ticon: 'notify_icon n-attention',\n\t\t\t\t\tanimation: 'fade',\n\t\t\t\t\twidth: 'auto',\n\t\t\t\t\tdelay: '3000'\n\t\t\t\t});\n\t\t\t}\n\t\t\t});\n\t\t});\n\t\t");
    }
    $html .= $options['required'] == 1 && $defender->inputHasError($input_name) || $defender->inputHasError($input_name) ? "<div id='" . $options['input_id'] . "-help' class='label label-danger p-5 display-inline-block'>" . $options['error_text'] . "</div>" : "";
    $html .= $options['inline'] ? "</div>\n" : '';
    $html .= "</div>\n";
    $defender->add_field_session(array('input_name' => $input_name, 'type' => 'textarea', 'title' => $label, 'id' => $options['input_id'], 'required' => $options['required'], 'safemode' => $options['safemode'], 'error_text' => $options['error_text']));
    return $html;
}
コード例 #6
0
            $archive_shout_link = FUSION_SELF;
            $archive_shout_message = "";
        }
    } else {
        $archive_shout_link = FUSION_SELF;
        $archive_shout_message = "";
    }
    echo "<form name='archive_form' method='post' action='" . $archive_shout_link . "'>\n";
    echo "<div style='text-align:center'>\n";
    if (iGUEST) {
        echo $locale['SB_name'] . "<br />\n";
        echo "<input type='text' name='archive_shout_name' value='' class='textbox' maxlength='30' style='width:200px;' /><br />\n";
        echo $locale['SB_message'] . "<br />\n";
    }
    echo "<textarea name='archive_shout_message' rows='4' cols='50' class='textbox'>" . $archive_shout_message . "</textarea><br />\n";
    echo "<div style='text-align:center'>" . display_bbcodes("100%", "archive_shout_message", "archive_form", "smiley|b|i|u|url|color") . "</div>\n";
    if (iGUEST) {
        echo $locale['SB_validation_code'] . "<br />\n";
        echo "<img id='captcha' src='" . INCLUDES . "captchas/securimage/securimage_show.php' alt='' /><br />\n";
        echo "<a href='" . INCLUDES . "captchas/securimage/securimage_play.php'><img src='" . INCLUDES . "captchas/securimage/images/audio_icon.gif' alt='' class='tbl-border' style='margin-bottom:1px' /></a>\n";
        echo "<a href='#' onclick=\"document.getElementById('captcha').src = '" . INCLUDES . "captchas/securimage/securimage_show.php?sid=' + Math.random(); return false\"><img src='" . INCLUDES . "captchas/securimage/images/refresh.gif' alt='' class='tbl-border' /></a><br />\n";
        echo $locale['SB_enter_validation_code'] . "<br />\n<input type='text' name='captcha_code' class='textbox' style='width:100px' /><br />\n";
    }
    echo "<br /><input type='submit' name='post_archive_shout' value='" . $locale['SB_shout'] . "' class='button' />\n";
    echo "</div>\n</form>\n<br />\n";
} else {
    echo "<div style='text-align:center'>" . $locale['SB_login_req'] . "</div>\n";
}
$rows = dbcount("(shout_id)", DB_SHOUTBOX, "shout_hidden='0'");
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) {
    $_GET['rowstart'] = 0;
コード例 #7
0
ファイル: postnewthread.php プロジェクト: roniwahyu/AKEUDA
 add_to_title($locale['global_201'] . $locale['401']);
 echo "<!--pre_postnewthread-->";
 opentable($locale['401']);
 if (!isset($_POST['previewpost'])) {
     echo "<div class='tbl2' style='margin-bottom:5px'><span class='small'><a href='index.php'>" . $settings['sitename'] . "</a> :: " . $caption . "</span></div>\n";
 }
 echo "<form id='inputform' method='post' action='" . FUSION_SELF . "?action=newthread&amp;forum_id=" . $_GET['forum_id'] . "' enctype='multipart/form-data'>\n";
 echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n<tr>\n";
 echo "<td width='145' class='tbl2'>" . $locale['460'] . "</td>\n";
 echo "<td class='tbl1'><input type='text' name='subject' value='" . $subject . "' class='textbox' maxlength='255' style='width: 250px' /></td>\n";
 echo "</tr>\n<tr>\n";
 echo "<td valign='top' width='145' class='tbl2'>" . $locale['461'] . "</td>\n";
 echo "<td class='tbl1'><textarea name='message' cols='60' rows='15' class='textbox' style='width:98%'>" . $message . "</textarea></td>\n";
 echo "</tr>\n<tr>\n";
 echo "<td width='145' class='tbl2'>&nbsp;</td>\n";
 echo "<td class='tbl1'>" . display_bbcodes("99%", "message") . "</td>\n";
 echo "</tr>\n<tr>\n";
 echo "<td valign='top' width='145' class='tbl2'>" . $locale['463'] . "</td>\n";
 echo "<td class='tbl1'>\n";
 if (iMOD || iSUPERADMIN) {
     echo "<label><input type='checkbox' name='sticky_thread' value='1'" . $sticky_thread_check . " /> " . $locale['480'] . "</label><br />\n";
     echo "<label><input type='checkbox' name='lock_thread' value='1'" . $lock_thread_check . " /> " . $locale['481'] . "</label><br />\n";
 }
 echo "<label><input type='checkbox' name='disable_smileys' value='1'" . $disable_smileys_check . " /> " . $locale['482'] . "</label>";
 if (array_key_exists("user_sig", $userdata) && $userdata['user_sig']) {
     echo "<br />\n<label><input type='checkbox' name='show_sig' value='1'" . $sig_checked . " /> " . $locale['483'] . "</label>";
 }
 if ($settings['thread_notify']) {
     echo "<br />\n<label><input type='checkbox' name='notify_me' value='1'" . $notify_checked . " /> " . $locale['486'] . "</label>";
 }
 echo "</td>\n</tr>\n";
コード例 #8
0
         if (isset($_GET['action']) && $_GET['action'] == "edit") {
             $sel = $data['album_parent'] == $data2['album_id'] ? " selected='selected'" : "";
         }
         $editlist .= "<option value='" . $data2['album_id'] . "'{$sel}>" . $data2['album_title'] . "</option>\n";
         //pimped
     }
 }
 //Pimped: Subcategory end
 echo "<form name='inputform' method='post' action='{$formaction}' enctype='multipart/form-data'>\n";
 echo "<table cellspacing='0' cellpadding='0' class='center'>\n<tr>\n";
 echo "<td class='tbl'>" . $locale['440'] . "</td>\n";
 echo "<td class='tbl'><input type='text' name='album_title' value='" . $album_title . "' maxlength='100' class='textbox' style='width:330px;' /></td>\n";
 echo "</tr>\n<tr>\n";
 echo "<td valign='top' class='tbl'>" . $locale['441'] . "</td>\n";
 echo "<td class='tbl'><textarea name='album_description' cols='60' rows='5' class='textbox' style='width:330px;'>" . $album_description . "</textarea><br />\n";
 echo display_bbcodes("300px", "album_description", "inputform", "b|i|u|center|small|url|mail|img|quote") . "</td>\n";
 echo "</tr>\n<tr>\n";
 echo "<td class='tbl'>" . $locale['446'] . "</td>\n";
 // Pimped
 echo "<td class='tbl'><select name='album_parent' class='textbox' style='width:150px;'>\n" . $editlist . "</select>\n";
 echo "</td>\n</tr>\n<tr>\n";
 echo "<td class='tbl'>" . $locale['442'] . "</td>\n";
 echo "<td class='tbl'><select name='album_access' class='textbox' style='width:150px;'>\n" . $access_opts . "</select>\n";
 echo $locale['443'] . "<input type='text' name='album_order' value='" . $album_order . "' maxlength='4' class='textbox' style='width:40px;' />\n";
 echo "</td>\n</tr>\n<tr>\n";
 echo "<td valign='top' class='tbl'>" . $locale['444'];
 if (isset($_GET['action']) && $_GET['action'] == "edit" && ($album_thumb && file_exists(PHOTOS . $album_thumb))) {
     echo "<br /><br />\n<a class='small' href='" . FUSION_SELF . $aidlink . "&amp;action=deletethumb&amp;album_id=" . $_GET['album_id'] . "'>" . $locale['469'] . "</a></td>\n";
     echo "<td class='tbl'><img src='" . PHOTOS . $album_thumb . "' alt='album_thumb' />";
 } else {
     echo "</td>\n<td class='tbl'><input type='file' name='album_pic_file' class='textbox' style='width:250px;' />";
コード例 #9
0
ファイル: forums.php プロジェクト: keddyboys/kmods
         if (!in_array($option['0'], $hide)) {
             $sel = $selected == $option['0'] ? " selected='selected'" : "";
             $option_list .= "<option value='" . $option['0'] . "'{$sel}>" . $option['1'] . "</option>\n";
         }
     }
     return $option_list;
 }
 opentable($forum_title);
 echo "<form name='addforum' method='post' action='{$forum_action}'>\n";
 echo "<table align='center' cellpadding='0' cellspacing='0' width='300'>\n<tr>\n";
 echo "<td colspan='2' class='tbl'>" . $locale['520'] . "<br />\n";
 echo "<input type='text' name='forum_name' value='" . $forum_name . "' class='textbox' style='width:285px;' /></td>\n";
 echo "</tr>\n<tr>\n";
 echo "<td colspan='2' class='tbl'>" . $locale['521'] . "<br />\n";
 echo "<textarea type='text' name='forum_description' cols='70' rows='4' class='textbox' style='width:98%'>" . $forum_description . "</textarea><br />\n";
 echo display_bbcodes("280px;", "forum_description", "addforum", "b|i|u|color|url|center|size|big|small") . "</td>\n";
 echo "</tr>\n<tr>\n";
 echo "<td class='tbl'>" . $locale['522'] . "<br />\n";
 echo "<select name='forum_cat' class='textbox' style='width:225px;'>\n" . $cat_opts . "</select></td>\n";
 echo "</tr>\n<tr>\n";
 //subforums
 echo "<td class='tbl'>" . $locale['519'] . "<br />\n";
 //subforums
 echo "<select name='forum_parent' class='textbox' style='width:225px;'>\n" . (isset($_GET['forum_id']) ? forum_admin_editopts($_GET['forum_id']) : forum_admin_editopts(null)) . "</select></td>\n";
 //subforums
 echo "<td width='55' class='tbl'>";
 if (!isset($_GET['action']) || $_GET['action'] != "edit") {
     echo $locale['523'] . "<br />\n<input type='text' name='forum_order' value='" . $forum_order . "' class='textbox' style='width:45px;' />";
     echo "</td>\n</tr>\n<tr>\n";
     echo "<td align='center' colspan='2' class='tbl'>\n";
     echo "<input type='submit' name='save_forum' value='" . $locale['532'] . "' class='button' />";
コード例 #10
0
     } else {
         redirect(FUSION_SELF . $aidlink);
     }
 }
 if (isset($_GET['action']) && $_GET['action'] == "edit" && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
     $result = dbquery("SELECT shout_id, shout_message FROM " . DB_SHOUTBOX . " WHERE shout_id='" . $_GET['shout_id'] . "'");
     if (dbrows($result)) {
         $data = dbarray($result);
         opentable($locale['SB_edit_shout']);
         echo "<form name='editform' method='post' action='" . FUSION_SELF . $aidlink . "&amp;shout_id=" . $data['shout_id'] . "'>\n";
         echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
         echo "<td class='tbl'>" . $locale['SB_message'] . "</td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td class='tbl'><textarea name='shout_message' cols='60' rows='3' class='textbox' style='width:250px;'>" . str_replace("<br />", "", $data['shout_message']) . "</textarea></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td class='tbl' align='center'>" . display_bbcodes("150px;", "shout_message", "editform", "smiley|b|u|url|color") . "</td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td align='center' class='tbl'><input type='submit' name='saveshout' value='" . $locale['SB_save_shout'] . "' class='button' /></td>\n";
         echo "</tr>\n</table>\n\n</form>";
         closetable();
     } else {
         redirect(FUSION_SELF . $aidlink);
     }
 }
 opentable($locale['SB_edit_shout']);
 echo $nav;
 $result = dbquery("SELECT * FROM " . DB_SHOUTBOX);
 $rows = dbrows($result);
 if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) {
     $_GET['rowstart'] = 0;
 }
コード例 #11
0
echo "<select name='date[day]'>";
for ($i = 1; $i <= 31; $i++) {
    echo "<option value='" . $i . "'" . ($i == $date['day'] ? " selected='selected'" : "") . ">" . $i . "</option>";
}
echo "</select>-<select name='date[month]'>";
for ($i = 1; $i <= 12; $i++) {
    echo "<option value='" . $i . "'" . ($i == $date['month'] ? " selected='selected'" : "") . ">" . $locale['alcr_mon_' . $i] . "</option>";
}
echo "</select>-<select name='date[year]'>";
for ($i = date('Y') - 5; $i <= date('Y') + 5; $i++) {
    echo "<option value='" . $i . "'" . ($i == $date['year'] ? " selected='selected'" : "") . ">" . $i . "</option>";
}
echo "</select> <select name='date[hour]'>";
for ($i = 0; $i <= 23; $i++) {
    echo "<option value='" . ($i < 10 ? "0" : "") . $i . "'" . ($i == $date['hour'] ? " selected='selected'" : "") . ">" . ($i < 10 ? "0" : "") . $i . "</option>";
}
echo "</select>:<select name='date[minute]'>";
for ($i = 0; $i <= 59; $i++) {
    echo "<option value='" . ($i < 10 ? "0" : "") . $i . "'" . ($i == $date['minute'] ? " selected='selected'" : "") . ">" . ($i < 10 ? "0" : "") . $i . "</option>";
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "<tr valign='top'>";
echo "<td class='tbl'>" . $locale['alcr24'] . "</td>";
echo "<td class='tbl'><textarea class='textbox' name='desc' style='width: 100%' rows='10' id='desc'>" . $desc . "</textarea><br />" . display_bbcodes("99%", "desc") . "</td>";
echo "</tr>";
echo "<tr><td class='tbl' colspan='2'>" . ($is_edit ? "<input type='hidden' name='event_id' value='" . $event_id . "' />" : "") . "<input type='submit' class='button' name='save' value='" . $locale['alcr15'] . "' /> <a href='" . ($is_edit ? FUSION_SELF . "?p=day&date=" . $date['year'] . "-" . $date['month'] . "-" . $date['day'] : FUSION_SELF) . "'>" . $locale['alcr27'] . "</a></td></tr>";
echo "</table>";
echo "</form>";
closetable();
コード例 #12
0
    echo "<tr>\n";
    echo "<td width='50%' class='tbl'><label for='welcome_pm'>" . $locale['welpm102'] . ":</label></td>\n";
    echo "<td width='50%' class='tbl'>\r\n<select name='welcome_pm' class='textbox' id='welcome_pm'>\n\r\n<option value='0'" . ($settings['welcome_pm'] == 0 ? " selected='selected'" : "") . ">" . $locale['welpm104'] . "</option>\n\r\n<option value='1'" . ($settings['welcome_pm'] == 1 ? " selected='selected'" : "") . ">" . $locale['welpm103'] . "</option>\n\r\n</select>\n\r\n</td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td width='50%' class='tbl'><label for='welcome_pm_from'>" . $locale['welpm105'] . ":</label></td>\n";
    echo "<td width='50%' class='tbl'>" . $opt . "</td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td width='50%' class='tbl'><label for='welcome_pm_subject'>" . $locale['welpm110'] . ":</label></td>\n";
    echo "<td width='50%' class='tbl'><input type='text' name='welcome_pm_subject' id='welcome_pm_subject' value='" . $settings['welcome_pm_subject'] . "' class='textbox' style='width: 250px;' /></td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td width='50%' class='tbl' valign='top'><label for='welcome_pm_message'>" . $locale['welpm111'] . ":</label></td>\n";
    echo "<td width='50%' class='tbl'>\n";
    echo "<textarea name='welcome_pm_message' id='welcome_pm_message' class='textbox' rows='8' cols='55'>" . $settings['welcome_pm_message'] . "</textarea><br />\n";
    echo display_bbcodes("98%", "welcome_pm_message", "settingsform");
    echo "</td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td align='center' colspan='2' class='tbl'><label>\r\n<input type='checkbox' name='welcome_pm_smiley' value='n'" . ($settings['welcome_pm_smiley'] == "n" ? " checked='checked'" : "") . " />" . $locale['welpm112'] . "</label></td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td width='50%' class='tbl'>" . info_helper("welcome_message") . "</td>";
    echo "<td width='50%' class='tbl'><input type='submit' name='savesettings' value='" . $locale['750'] . "' class='button' /></td>\n";
    echo "</tr>\n";
    echo "</table>\n";
    echo "</form>\n";
    closetable();
}
require_once TEMPLATES . "footer.php";
コード例 #13
0
function showcomments($ctype, $cdb, $ccol, $cid, $clink, $ingroup)
{
    global $settings, $locale, $userdata, $aidlink;
    if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
        $eresult = dbquery("SELECT tcm.*,user_name FROM " . DB_COMMENTS . " tcm\n\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\n\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "' AND comment_item_id='" . $cid . "' AND comment_type='" . $ctype . "'");
        if (dbrows($eresult)) {
            $edata = dbarray($eresult);
            if (iADMIN && checkrights("C") || iMEMBER && $edata['comment_name'] == $userdata['user_id'] && isset($edata['user_name'])) {
                $clink .= "&amp;c_action=edit&amp;comment_id=" . $edata['comment_id'];
                $comment_message = $edata['comment_message'];
            }
        } else {
            $comment_message = "";
        }
    } else {
        $comment_message = "";
    }
    if (iMEMBER && $ingroup) {
        add_to_head("<script type='text/javascript'>window.onload=setTimeout(\"hideall()\", 250);\n\t\tfunction hideall(){\n\t\t\tdocument.getElementById('bbcode').style.display='none';\n\t\t}\n\t\tfunction showhide(msg_id) {\n\t\t   document.getElementById(msg_id).style.display = document.getElementById(msg_id).style.display == 'none' ? 'block' : 'none';\n\t\t}</script>\n");
        require_once INCLUDES . "bbcode_include.php";
        echo "<a id='edit_comment' name='edit_comment'></a>\n";
        echo "<form name='inputform' method='post' action='" . $clink . "'>\n";
        echo "<div align='center'>\n";
        echo "<textarea name='comment_message' rows='2' class='textbox' style='width:90%'>" . $comment_message . "</textarea><br />\n";
        echo "<input type='submit' name='post_comment' value='" . $locale['uc283'] . "' class='button' /> :: <a onClick='showhide(\"bbcode\")'>" . $locale['uc285'] . "</a>\n";
        echo "<div id='bbcode'><br />" . display_bbcodes("360px", "comment_message") . "</div>\n";
        echo "</div>\n</form>\n";
    } else {
        echo "<div align='center'>" . $locale['uc289'] . "</div>\n";
    }
    echo "</td>\n</tr>\n";
    echo "<tr>\n<td class='tbl1' style='padding:6px;'>\n";
    if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "delete") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
        if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_name='" . $userdata['user_id'] . "'")) {
            $result = dbquery("DELETE FROM " . DB_COMMENTS . " WHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : " AND comment_name='" . $userdata['user_id'] . "'"));
        }
        redirect($clink);
    }
    if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) {
        if (iMEMBER) {
            $comment_name = $userdata['user_id'];
        } elseif ($settings['guestposts'] == "1") {
            $comment_name = trim(stripinput($_POST['comment_name']));
            $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
            if (isnum($comment_name)) {
                $comment_name = "";
            }
        }
        $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
        if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
            $comment_updated = false;
            if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_name='" . $userdata['user_id'] . "'")) {
                if ($comment_message) {
                    $result = dbquery("UPDATE " . DB_COMMENTS . " SET comment_message='{$comment_message}' WHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : " AND comment_name='" . $userdata['user_id'] . "'"));
                    $comment_updated = true;
                }
            }
            if ($comment_updated) {
                $c_start = (ceil(dbcount("(comment_id)", DB_COMMENTS, "comment_id<='" . $_GET['comment_id'] . "' AND comment_item_id='" . $cid . "' AND comment_type='" . $ctype . "'") / 10) - 1) * 10;
            }
            redirect($clink . "&amp;rstart=" . (isset($c_start) && isnum($c_start) ? $c_start : ""));
        } else {
            if (!dbcount("(" . $ccol . ")", $cdb, $ccol . "='" . $cid . "'")) {
                redirect(BASEDIR . "index.php");
            }
            if ($comment_name && $comment_message) {
                require_once INCLUDES . "flood_include.php";
                if (!flood_control("comment_datestamp", DB_COMMENTS, "comment_ip='" . USER_IP . "'")) {
                    $result = dbquery("INSERT INTO " . DB_COMMENTS . " (comment_item_id, comment_type, comment_name, comment_message, comment_datestamp, comment_ip) VALUES ('{$cid}', '{$ctype}', '{$comment_name}', '{$comment_message}', '" . time() . "', '" . USER_IP . "')");
                }
            }
            $c_start = (ceil(dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $cid . "' AND comment_type='" . $ctype . "'") / 10) - 1) * 10;
            redirect($clink . "&amp;rstart=" . $c_start);
        }
    }
    echo "<a id='comments' name='comments'></a>";
    $c_rows = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='{$cid}' AND comment_type='{$ctype}'");
    if (!isset($_GET['c_start']) || !isnum($_GET['c_start'])) {
        $_GET['c_start'] = 0;
    }
    $result = dbquery("SELECT tcm.*,tcu.* FROM " . DB_COMMENTS . " tcm\n\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\n\t\tWHERE comment_item_id='{$cid}' AND comment_type='{$ctype}'\n\t\tORDER BY comment_datestamp DESC LIMIT " . $_GET['c_start'] . ",10");
    if (dbrows($result)) {
        $i = $_GET['c_start'] + 1;
        if ($c_rows > 10) {
            echo "<div style='text-align:center;margin-bottom:5px;'>" . makecommentnav($_GET['c_start'], 10, $c_rows, 3, $clink . "&amp;") . "</div>\n";
        }
        echo "<table width='100%' cellspacing='1' cellpadding='0'>\n";
        while ($data = dbarray($result)) {
            echo "<tr><td class='tbl2' rowspan='2' width='1'>\n";
            if ($data['user_avatar']) {
                list($width, $height) = getimagesize(IMAGES . "avatars/" . $data['user_avatar']);
                $new_width = 70;
                $new_height = $height * ($new_width / $height);
                echo "<img src='" . IMAGES . "avatars/" . $data['user_avatar'] . "' alt='' style='width:" . $new_width . "px;height:" . $new_height . "px'>\n";
            } else {
                echo "<img src='" . IMAGES . "noav.gif' alt='' style='width:70px;height:70px'>\n";
            }
            echo "</td>\n<td class='tbl2' style='height:30px;'>";
            if (iADMIN && checkrights("C") || iMEMBER && $data['comment_name'] == $userdata['user_id'] && isset($data['user_name'])) {
                echo "<div style='float:right'>\n<a href='" . FUSION_REQUEST . "&amp;c_action=edit&amp;comment_id=" . $data['comment_id'] . "#edit_comment'>" . $locale['c108'] . "</a> |\n";
                echo "<a href='" . FUSION_REQUEST . "&amp;c_action=delete&amp;comment_id=" . $data['comment_id'] . "'>" . $locale['c109'] . "</a>\n</div>\n";
            }
            echo "<a href='" . FUSION_REQUEST . "#c" . $data['comment_id'] . "' id='c" . $data['comment_id'] . "' name='c" . $data['comment_id'] . "'>#" . $i . "</a> | ";
            echo "<a href='" . BASEDIR . "profile.php?lookup=" . $data['comment_name'] . "'>" . showLabel($data['comment_name']) . "</a>\n";
            echo "<span class='small'>" . timepassed($data['comment_datestamp']) . "</span></td></tr>\n<tr><td class='tbl1' style='vertical-align:top;'>\n";
            echo nl2br(parseubb(parsesmileys($data['comment_message']))) . "</td></tr>\n";
            $i++;
        }
        echo "</table>";
        if (iADMIN && checkrights("C")) {
            echo "<div align='right' class='tbl2'><a href='" . ADMIN . "comments.php" . $aidlink . "&amp;ctype={$ctype}&amp;cid={$cid}'>" . $locale['c106'] . "</a></div>\n";
        }
        if ($c_rows > 10) {
            echo "<div style='text-align:center;margin-top:5px;'>" . makecommentnav($_GET['c_start'], 10, $c_rows, 3, $clink . "&amp;") . "</div>\n";
        }
    } else {
        echo $locale['uc284'] . "\n";
    }
}
コード例 #14
0
ファイル: usercp.php プロジェクト: simplyianm/clububer
    if (isset($_POST['update_profile'])) {
        $result = dbquery("update " . DB_USERS . " set user_sig='" . (isset($_POST['user_sig']) ? stripinput(trim($_POST['user_sig'])) : "") . "' where user_id='" . $userdata['user_id'] . "'");
        redirect(FUSION_SELF . "?section=signature&status=updated");
    }
    if (isset($_GET['status']) && $_GET['status'] == "updated") {
        echo "<tr>\n<td class='tbl1' style='padding:20px; text-align:center; font-weight:bold;'>" . $locale['uc334'] . "</td>\n</tr>\n";
    }
    add_to_title(" :: " . $locale['uc108']);
    require_once INCLUDES . "bbcode_include.php";
    echo "<tr>\n<td class='tbl2 navtitle'>" . $locale['uc108'] . "</td>\n</tr>\n";
    echo "<tr>\n<td class='tbl2 navsection'>" . $locale['uc331'] . "</td>\n</tr>\n";
    echo "<tr>\n<td class='tbl1' style='padding:7px;'><form action='" . FUSION_SELF . "?section=signature' method='post' name='sigform'>\n";
    echo nl2br(parseubb(parsesmileys($userdata['user_sig']), "b|i|u||center|small|url|mail|img|color")) . "</td>\n</tr>\n";
    echo "<tr>\n<td class='tbl2 navsection'>" . $locale['uc332'] . "</td>\n</tr>\n";
    echo "<tr>\n<td class='tbl1' align='center'><textarea name='user_sig' cols='60' rows='5' class='textbox' style='width:295px'>" . (isset($userdata['user_sig']) ? $userdata['user_sig'] : "") . "</textarea><br />\n";
    echo display_bbcodes("300px", "user_sig", "sigform", "smiley|b|i|u||center|small|url|mail|img|color") . "<br />";
    echo "<input type='submit' name='update_profile' value='" . $locale['uc333'] . "' class='button'>\n</form>\n</td>\n</tr>\n";
    /* User CP -> Settings -> Email & Password */
} elseif ($_GET['section'] == "email") {
    add_to_title(" :: " . $locale['uc109']);
    if (isset($_POST['update_profile'])) {
        include INFUSIONS . "fusionboard4/includes/update_pass.php";
    }
    if (isset($_GET['status']) && $_GET['status'] == "updated") {
        echo "<tr>\n<td class='tbl1' style='padding:20px; text-align:center; font-weight:bold;'>" . $locale['uc343'] . "</td>\n</tr>\n";
    }
    if (isset($error) && $error) {
        echo "<tr>\n<td class='tbl1' style='padding:20px; text-align:center; font-weight:bold;'>" . $error . "</td>\n</tr>\n";
    }
    echo "<tr>\n<td class='tbl2 navtitle'>" . $locale['uc109'] . "</td>\n</tr>\n";
    echo "<tr>\n<td class='tbl1' style='padding:10px;'>\n";
コード例 #15
0
}
echo "</td>\n<td valign='top' width='25%' class='small'>\r\n" . (checkrights("SU") ? "<a href='" . ADMIN . "submissions.php" . $aidlink . "#news_submissions'>" . $locale['254'] . "</a>" : $locale['254']) . " " . dbcount("(submit_id)", DB_SUBMISSIONS, "submit_type='n'") . "<br />\r\n" . (checkrights("SU") ? "<a href='" . ADMIN . "submissions.php" . $aidlink . "#article_submissions'>" . $locale['255'] . "</a>" : $locale['255']) . " " . dbcount("(submit_id)", DB_SUBMISSIONS, "submit_type='a'") . "<br />\r\n" . (checkrights("SU") ? "<a href='" . ADMIN . "submissions.php" . $aidlink . "#link_submissions'>" . $locale['256'] . "</a>" : $locale['256']) . " " . dbcount("(submit_id)", DB_SUBMISSIONS, "submit_type='l'") . "<br />\r\n" . (checkrights("SU") ? "<a href='" . ADMIN . "submissions.php" . $aidlink . "#photo_submissions'>" . $locale['260'] . "</a>" : $locale['260']) . " " . dbcount("(submit_id)", DB_SUBMISSIONS, "submit_type='p'") . "\r\n</td>\n<td valign='top' width='25%' class='small'>\r\n" . $locale['257'] . " " . dbcount("(comment_id)", DB_COMMENTS) . "<br />\r\n" . $locale['258'] . " " . dbcount("(shout_id)", DB_SHOUTBOX) . "<br />\r\n" . $locale['259'] . " " . dbcount("(post_id)", DB_POSTS) . "<br />\r\n" . $locale['261'] . " " . dbcount("(photo_id)", DB_PHOTOS) . "\r\n</td>\n</tr>\n</table>\n";
closetable();
// Admin Notes Panel
// Author: Johan Wilson (Barspin)
// Contact: barspin@blendtek.net
// modified by slaughter for PiF
if ($settings['adminmenue_notes']) {
    include_once INCLUDES . "bbcode_include.php";
    add_to_head("<script type='text/javascript'>\r\n\$(function(){\r\n\$('.loding').hide();\r\n\t\$('#notes_q div').hover(function() {\r\n\t\t\$(this).find('.loding').show();\r\n\t}, function() {\r\n\t\t\$(this).find('.loding').hide();\r\n\t});\r\n\$('#notes_q a').click(function(){\r\nvar element = \$(this);\r\nvar noteid = element.attr('id');\r\nvar info = 'id=' + noteid;\r\n\$(element).find('.loding').hide();\r\n\$(element).parent('li').animate({'opacity': .5 });\r\n\$(element).append(\"<img src='" . IMAGES . "ajax-loader.gif' alt='Loading' style='vertical-align:middle;border:0;' />\");\r\n\$.ajax({\r\n type: 'GET',\r\n url: '" . FUSION_SELF . $aidlink . "',\r\n data: info,\r\n success: function(){\r\n element.parent().eq(0).fadeOut('fast');\r\n }\r\n});\r\nreturn false;\r\n}); \r\n\$('#notes_submit').click(function(){\r\nvar loading = \$('div#note_loading').html(\"<img src='" . IMAGES . "ajax-loader.gif' alt='Loading' style='vertical-align:middle;border:0;' />\"); \r\nvar content = \$('#notes_content').val();\r\nvar name = \$('#note_name').val();\r\nvar url = 'submit=1&content=' + content + '&submit=1&name=' + name;\r\nvar type = \$('#notes_content').val();\r\nif (type == '') {\r\n \$(loading).hide();\r\n} else {\r\n \$(loading).show();\r\n \$.ajax({\r\n  type: 'POST',\r\n  url: '" . FUSION_SELF . $aidlink . "',\r\n  data: url,\r\n  success: function(){\r\n  \$('div#note_loading').after(\"<div style='float:left' class='admin_note'><strong>\" + name + \"</strong>&nbsp;<img src='' alt='' style='height:16px;width:0px;' /><br /><div class='shoutboxdate'>" . showdate("%d %b %H:%M", time()) . "</div><div class='notify'>\" + content + \"</div></div>\");\r\n  \$(loading).hide();\r\n  \$('#notes_content').val('');\r\n  }\r\n });\r\n}\r\n\r\nreturn false;\r\n});\r\n});\r\n</script>\r\n\r\n<style type='text/css'>\r\n.notify{background:#FFD6D6 none repeat scroll 0 0;border-bottom:2px solid #EF706F;border-top:2px solid #EF706F;color:#CC0000;padding:2px;margin-bottom:5px;margin-top: 2px;}\r\n.admin_note{min-width:100px;margin:3px;padding:3px 0;list-style-type:none;overflow:auto;}\r\n</style>");
    openside($locale['note_01'], true);
    echo "<div id='notes' style='float:left'>\n";
    echo "<form id='notes_form' action='" . FUSION_SELF . $aidlink . "' method='post'>\n";
    echo "<input type='hidden' name='note_name' id='note_name' value='" . $userdata['user_name'] . "' maxlength='30' />\n";
    echo "<br/>\n<textarea name='notes_content' id='notes_content' class='textbox' cols='20' rows='4' style='width:140px'></textarea><br />\n";
    echo "" . display_bbcodes("150px;", "notes_content", "notes_form", "smiley|b|u|url") . "";
    echo "<input type='submit' id='notes_submit' name='notes_submit' class='button' value='" . $locale['note_02'] . "' />\n";
    echo "</form>\n";
    echo "</div><br />\n";
    $result = dbquery("SELECT note_id, note_name, note_text, note_datestamp FROM " . DB_ADMIN_NOTES . " ORDER BY note_id DESC");
    echo "<div class='admin_notes' id='notes_q'>";
    echo "<div id='note_loading'></div>\n";
    while ($data = dbarray($result)) {
        echo "<div style='float:left' class='admin_note'>";
        echo "<strong>" . $data['note_name'] . "</strong>&nbsp;";
        echo "<a id='" . $data['note_id'] . "' href='" . FUSION_SELF . "?id=" . $data['note_id'] . "'>";
        echo "<img class='loding' src='" . get_image("cancel") . "' title='" . $locale['note_03'] . "?' alt='" . $locale['note_03'] . "?' style='border:0;margin:0;vertical-align:bottom;' />";
        echo "</a><img src='' alt='' style='height:16px;width:0px;' /><br />";
        echo "<div class='shoutboxdate'>" . showdate("%d %b %H:%M", $data['note_datestamp']) . "</div>";
        echo "<div class='notify'>" . parseubb(parsesmileys($data['note_text']), "b|i|u|url") . "</div>";
        echo "</div>";
コード例 #16
0
ファイル: comments.php プロジェクト: simplyianm/clububer
    redirect("comments.php" . $aidlink . "&ctype=" . $_GET['ctype'] . "&cid=" . $_GET['cid'] . "&status=su");
}
if (isset($_GET['action']) && $_GET['action'] == "delete" && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
    $result = dbquery("DELETE FROM " . DB_COMMENTS . " WHERE comment_id='" . $_GET['comment_id'] . "'");
    redirect("comments.php" . $aidlink . "&ctype=" . $_GET['ctype'] . "&cid=" . $_GET['cid'] . "&status=del");
}
if (isset($_GET['action']) && $_GET['action'] == "edit" && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
    $result = dbquery("SELECT * FROM " . DB_COMMENTS . " WHERE comment_id='" . $_GET['comment_id'] . "'");
    if (dbrows($result)) {
        require_once INCLUDES . "bbcode_include.php";
        $data = dbarray($result);
        opentable($locale['400']);
        echo "<form name='inputform' method='post' action='" . FUSION_SELF . $aidlink . "&amp;comment_id=" . $_GET['comment_id'] . "&amp;ctype=" . $_GET['ctype'] . "&amp;cid=" . $_GET['cid'] . "'>\n";
        echo "<table cellpadding='0' cellspacing='0' width='400' class='center'>\n<tr>\n";
        echo "<td align='center' class='tbl'><textarea name='comment_message' cols='60' rows='5' class='textbox' style='width:360px'>" . $data['comment_message'] . "</textarea><br />\n";
        echo display_bbcodes("360px", "comment_message") . "</td>\n";
        echo "</tr>\n<tr>\n";
        echo "<td align='center' class='tbl'><input type='submit' name='save_comment' value='" . $locale['421'] . "' class='button' /></td>\n";
        echo "</tr>\n</table>\n</form>\n";
        closetable();
    }
}
opentable($locale['401']);
$i = 0;
$result = dbquery("SELECT * FROM " . DB_COMMENTS . " LEFT JOIN " . DB_USERS . "\n\tON " . DB_COMMENTS . ".comment_name=" . DB_USERS . ".user_id\n\tWHERE comment_type='" . $_GET['ctype'] . "' AND comment_item_id='" . $_GET['cid'] . "' ORDER BY comment_datestamp ASC");
if (dbrows($result)) {
    echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border center'>\n";
    while ($data = dbarray($result)) {
        echo "<tr>\n<td class='" . ($i % 2 == 0 ? "tbl1" : "tbl2") . "'><span class='comment-name'>";
        if ($data['user_name']) {
            echo "<a href='" . BASEDIR . "profile.php?lookup=" . $data['comment_name'] . "' class='slink'>" . $data['user_name'] . "</a>";
コード例 #17
0
            $shout_link = $link;
            $shout_message = "";
        }
    } else {
        $shout_link = $link;
        $shout_message = "";
    }
    echo "<a id='edit_shout' name='edit_shout'></a>\n";
    echo "<form name='shout_form' method='post' action='" . $shout_link . "'>\n";
    if (iGUEST) {
        echo $locale['global_151'] . "<br />\n";
        echo "<input type='text' name='shout_name' value='' class='textbox' maxlength='30' style='width:140px' /><br />\n";
        echo $locale['global_152'] . "<br />\n";
    }
    echo "<textarea name='shout_message' rows='4' cols='20' class='textbox' style='width:140px'>" . $shout_message . "</textarea><br />\n";
    echo display_bbcodes("150px;", "shout_message", "shout_form", "smiley|b|u|url|color") . "\n";
    if (iGUEST) {
        echo $locale['global_158'] . "<br />\n";
        echo "<img id='sb_captcha' src='" . INCLUDES . "securimage/securimage_show.php' alt='' /><br />\n";
        echo "<a href='" . INCLUDES . "securimage/securimage_play.php'><img src='" . INCLUDES . "securimage/images/audio_icon.gif' alt='' class='tbl-border' style='margin-bottom:1px' /></a>\n";
        echo "<a href='#' onclick=\"document.getElementById('sb_captcha').src = '" . INCLUDES . "securimage/securimage_show.php?sid=' + Math.random(); return false\"><img src='" . INCLUDES . "securimage/images/refresh.gif' alt='' class='tbl-border' /></a><br />\n";
        echo $locale['global_159'] . "<br />\n<input type='text' name='sb_captcha_code' class='textbox' style='width:100px' /><br />\n";
    }
    echo "<br /><input type='submit' name='post_shout' value='" . $locale['global_153'] . "' class='button' />\n";
    echo "</form>\n<br />\n";
} else {
    echo "<div style='text-align:center'>" . $locale['global_154'] . "</div><br />\n";
}
$numrows = dbcount("(shout_id)", DB_SHOUTBOX, "shout_hidden='0'");
$result = dbquery("SELECT ts.shout_id, ts.shout_name, ts.shout_message, ts.shout_datestamp, tu.user_id, tu.user_name, tu.user_status, tu.user_avatar\r\n\tFROM " . DB_SHOUTBOX . " ts\r\n\tLEFT JOIN " . DB_USERS . " tu ON ts.shout_name=tu.user_id\r\n\tWHERE ts.shout_hidden='0'\r\n\t" . (!(bool) IF_MULTI_LANGUAGE || !$settings['locale_multi_shout'] ? '' : " AND (ts.shout_language='all' OR ts.shout_language='" . LANGUAGE . "')") . "\r\n\tORDER BY ts.shout_datestamp DESC LIMIT 0," . $settings['numofshouts']);
if (dbrows($result)) {
コード例 #18
0
ファイル: skriv.php プロジェクト: necrophcodr/Muks
    require_once THEMES . "templates/footer.php";
    die;
}
require_once THEMES . "templates/header.php";
require_once INCLUDES . "bbcode_include.php";
if (isset($_POST['post_content'], $_POST['post_title'])) {
    $postcontent = mysql_real_escape_string(stripslashes($_POST['post_content']));
    $posttitle = mysql_real_escape_string(stripslashes($_POST['post_title']));
    $skriv_q1 = dbquery('INSERT INTO ' . DB_PREFIX . 'blogposts (bp_content, bp_author, bp_timestamp, bp_title) VALUES ("' . $postcontent . '", ' . $userdata['user_id'] . ', ' . time() . ', "' . $posttitle . '")');
    $skriv_q2 = dbquery('UPDATE ' . DB_PREFIX . 'users SET user_blog = user_blog + 1 WHERE user_id = ' . $userdata['user_id']);
    if ($skriv_q1 && $skriv_q2) {
        redirect('/blog/skriv.php?done=y');
    } else {
        redirect('/blog/skriv.php?done=n');
    }
}
opentable('Skriv blogindlæg');
echo '<a href="/blog/liste.php">Mine blogindlæg</a> :: <a href="/blog/liste.php?list=newest">Nyeste blogindlæg</a> :: <a href="/blog/liste.php?list=blogs">Brugere med blogindlæg</a> :: <a href="/blog/skriv.php">Skriv nyt blogindlæg</a><br />';
if (isset($_GET['done'])) {
    echo ($_GET['done'] === 'y' ? 'Indlægget blev indsendt' : 'Fejl! Indlægget blev muligvis ikke indsendt!') . '<br />';
}
?>
<form action="skriv.php" method="post" name="inputform">
<b>Titel:</b><input type="text" name="post_title" id="post_title" /><br />
<b>Indhold:</b><br /><textarea name="post_content" id="post_content" style="width: 90%;" cols="1" rows="15"></textarea><br />
<input type="submit" value="Indsend" />
</form><br />
<?php 
echo display_bbcodes("99%", "post_content");
closetable();
require_once THEMES . "templates/footer.php";
コード例 #19
0
function showcomments($ctype, $cdb, $ccol, $cid, $clink)
{
    global $settings, $locale, $userdata, $aidlink;
    $link = FUSION_SELF . (FUSION_QUERY ? "?" . FUSION_QUERY : "");
    $link = preg_replace("^(&amp;|\\?)c_action=(edit|delete)&amp;comment_id=\\d*^", "", $link);
    $cpp = $settings['comments_per_page'];
    if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "delete") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
        if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_name='" . $userdata['user_id'] . "'")) {
            $result = dbquery("DELETE FROM " . DB_COMMENTS . "\r\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : "\r\n\t\t\t\t\tAND comment_name='" . $userdata['user_id'] . "'"));
        }
        redirect($clink . ($settings['comments_sorting'] == "ASC" ? "" : "&amp;c_start=0"));
    }
    if ($settings['comments_enabled'] == "1") {
        if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) {
            if (iMEMBER) {
                $comment_name = $userdata['user_id'];
            } elseif ($settings['guestposts'] == "1") {
                if (!isset($_POST['comment_name'])) {
                    redirect($link);
                }
                $comment_name = trim(stripinput($_POST['comment_name']));
                $comment_name = preg_replace("(^[+0-9\\s]*)", "", $comment_name);
                if (isnum($comment_name)) {
                    $comment_name = "";
                }
                $_CAPTCHA_IS_VALID = FALSE;
                include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_check.php";
                if (!isset($_POST['captcha_code']) || $_CAPTCHA_IS_VALID == FALSE) {
                    redirect($link);
                }
            }
            $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
            if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
                $comment_updated = FALSE;
                if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\tAND comment_type='" . $ctype . "' AND comment_name='" . $userdata['user_id'] . "'\r\n\t\t\t\t\t\tAND comment_hidden='0'")) {
                    if ($comment_message) {
                        $result = dbquery("UPDATE " . DB_COMMENTS . " SET comment_message='" . $comment_message . "'\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : "\r\n\t\t\t\t\t\t\t\t\t\t\tAND comment_name='" . $userdata['user_id'] . "'"));
                        $comment_updated = TRUE;
                    }
                }
                if ($comment_updated) {
                    if ($settings['comments_sorting'] == "ASC") {
                        $c_operator = "<=";
                    } else {
                        $c_operator = ">=";
                    }
                    $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_id" . $c_operator . "'" . $_GET['comment_id'] . "'\r\n\t\t\t\t\t\t\t\tAND comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\t\t\tAND comment_type='" . $ctype . "'");
                    $c_start = (ceil($c_count / $cpp) - 1) * $cpp;
                }
                redirect($clink . "&amp;c_start=" . (isset($c_start) && isnum($c_start) ? $c_start : ""));
            } else {
                if (!dbcount("(" . $ccol . ")", $cdb, $ccol . "='" . $cid . "'")) {
                    redirect(BASEDIR . "index.php");
                }
                if ($comment_name && $comment_message) {
                    require_once INCLUDES . "flood_include.php";
                    if (!flood_control("comment_datestamp", DB_COMMENTS, "comment_ip='" . USER_IP . "'")) {
                        $result = dbquery("INSERT INTO " . DB_COMMENTS . " (\r\n\t\t\t\t\t\t\t\tcomment_item_id, comment_type, comment_name, comment_message, comment_datestamp,\r\n\t\t\t\t\t\t\t\tcomment_ip, comment_ip_type, comment_hidden\r\n\t\t\t\t\t\t\t) VALUES (\r\n\t\t\t\t\t\t\t\t'" . $cid . "', '" . $ctype . "', '" . $comment_name . "', '" . $comment_message . "', '" . time() . "',\r\n\t\t\t\t\t\t\t\t'" . USER_IP . "', '" . USER_IP_TYPE . "', '0'\r\n\t\t\t\t\t\t\t)");
                    }
                }
                if ($settings['comments_sorting'] == "ASC") {
                    $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\t\t\t\t\tAND comment_type='" . $ctype . "'");
                    $c_start = (ceil($c_count / $cpp) - 1) * $cpp;
                } else {
                    $c_start = 0;
                }
                redirect($clink . "&amp;c_start=" . $c_start);
            }
        }
        $c_arr = array("c_con" => array(), "c_info" => array("c_makepagenav" => FALSE, "admin_link" => FALSE));
        $c_rows = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\t\tAND comment_type='" . $ctype . "' AND comment_hidden='0'");
        if (!isset($_GET['c_start']) && $c_rows > $cpp) {
            $_GET['c_start'] = (ceil($c_rows / $cpp) - 1) * $cpp;
        }
        if (!isset($_GET['c_start']) || !isnum($_GET['c_start'])) {
            $_GET['c_start'] = 0;
        }
        $result = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcm.comment_datestamp,\r\n\t\t\t\t\ttcu.user_id, tcu.user_name, tcu.user_avatar, tcu.user_status\r\n\t\t\tFROM " . DB_COMMENTS . " tcm\r\n\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\r\n\t\t\tWHERE comment_item_id='" . $cid . "' AND comment_type='" . $ctype . "' AND comment_hidden='0'\r\n\t\t\tORDER BY comment_datestamp " . $settings['comments_sorting'] . " LIMIT " . $_GET['c_start'] . "," . $cpp);
        if (dbrows($result)) {
            $i = $settings['comments_sorting'] == "ASC" ? $_GET['c_start'] + 1 : $c_rows - $_GET['c_start'];
            if ($c_rows > $cpp) {
                $c_arr['c_info']['c_makepagenav'] = makepagenav($_GET['c_start'], $cpp, $c_rows, 3, $clink . "&amp;", "c_start");
            }
            while ($data = dbarray($result)) {
                $c_arr['c_con'][$i]['comment_id'] = $data['comment_id'];
                $c_arr['c_con'][$i]['edit_dell'] = FALSE;
                $c_arr['c_con'][$i]['i'] = $i;
                if ($data['user_name']) {
                    $c_arr['c_con'][$i]['comment_name'] = profile_link($data['comment_name'], $data['user_name'], $data['user_status']);
                } else {
                    $c_arr['c_con'][$i]['comment_name'] = $data['comment_name'];
                }
                //Add user avatar in comments new feature in v7.02.04
                $c_arr['c_con'][$i]['user_avatar'] = display_avatar($data, '80px');
                $c_arr['c_con'][$i]['comment_datestamp'] = $locale['global_071'] . showdate("longdate", $data['comment_datestamp']);
                $c_arr['c_con'][$i]['comment_message'] = "<!--comment_message-->\n" . nl2br(parseubb(parsesmileys($data['comment_message'])));
                if (iADMIN && checkrights("C") || iMEMBER && $data['comment_name'] == $userdata['user_id'] && isset($data['user_name'])) {
                    $c_arr['c_con'][$i]['edit_dell'] = "<!--comment_actions-->\n";
                    $c_arr['c_con'][$i]['edit_dell'] .= "<a href='" . FUSION_REQUEST . "&amp;c_action=edit&amp;comment_id=" . $data['comment_id'] . "#edit_comment'>";
                    $c_arr['c_con'][$i]['edit_dell'] .= $locale['c108'] . "</a> |\n";
                    $c_arr['c_con'][$i]['edit_dell'] .= "<a href='" . FUSION_REQUEST . "&amp;c_action=delete&amp;comment_id=" . $data['comment_id'] . "' onclick=\"return confirm('" . $locale['c110'] . "');\">";
                    $c_arr['c_con'][$i]['edit_dell'] .= $locale['c109'] . "</a>";
                }
                $settings['comments_sorting'] == "ASC" ? $i++ : $i--;
            }
            if (iADMIN && checkrights("C")) {
                $c_arr['c_info']['admin_link'] = "<!--comment_admin-->\n";
                $c_arr['c_info']['admin_link'] .= "<a href='" . ADMIN . "comments.php" . $aidlink . "&amp;ctype=" . $ctype . "&amp;cid=" . $cid . "'>" . $locale['c106'] . "</a>";
            }
        }
        // Render comments
        echo "<a id='comments' name='comments'></a>";
        render_comments($c_arr['c_con'], $c_arr['c_info']);
        // Add / edit comment
        opentable($locale['c102']);
        if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
            $eresult = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcu.user_name\r\n\t\t\t\tFROM " . DB_COMMENTS . " tcm\r\n\t\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\r\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "' AND comment_item_id='" . $cid . "'\r\n\t\t\t\t\tAND comment_type='" . $ctype . "' AND comment_hidden='0'");
            if (dbrows($eresult)) {
                $edata = dbarray($eresult);
                if (iADMIN && checkrights("C") || iMEMBER && $edata['comment_name'] == $userdata['user_id'] && isset($edata['user_name'])) {
                    $clink .= "&amp;c_action=edit&amp;comment_id=" . $edata['comment_id'];
                    $comment_message = $edata['comment_message'];
                }
            } else {
                $comment_message = "";
            }
        } else {
            $comment_message = "";
        }
        if (iMEMBER || $settings['guestposts'] == "1") {
            require_once INCLUDES . "bbcode_include.php";
            echo "<a id='edit_comment' name='edit_comment'></a>\n";
            echo openform('inputform', 'inputform', 'post', $clink);
            if (iGUEST) {
                echo "<div align='center' class='tbl'>\n" . $locale['c104'] . "<br />\n";
                echo "<input type='text' name='comment_name' maxlength='30' class='textbox' style='width:360px' />\n";
                echo "</div>\n";
            }
            echo "<div class='row'>\n";
            echo "<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12'>\n";
            echo form_textarea('', 'comment_message', 'comment_message', $comment_message, array('required' => 1));
            echo display_bbcodes("360px", "comment_message");
            if (iGUEST && (!isset($_CAPTCHA_HIDE_INPUT) || isset($_CAPTCHA_HIDE_INPUT) && !$_CAPTCHA_HIDE_INPUT)) {
                $_CAPTCHA_HIDE_INPUT = FALSE;
                echo "<div style='width:360px; margin:10px auto;'>";
                echo $locale['global_150'] . "<br />\n";
                include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_display.php";
                if (!$_CAPTCHA_HIDE_INPUT) {
                    echo "<br />\n<label for='captcha_code'>" . $locale['global_151'] . "</label>";
                    echo "<br />\n<input type='text' id='captcha_code' name='captcha_code' class='textbox' autocomplete='off' style='width:100px' />\n";
                }
                echo "</div>\n";
            }
            echo form_button($comment_message ? $locale['c103'] : $locale['c102'], 'post_comment', 'post_comment', $comment_message ? $locale['c103'] : $locale['c102'], array('class' => 'btn btn-primary m-t-10'));
            echo "</div>\n</div>\n";
            echo closeform();
        } else {
            echo $locale['c105'] . "\n";
        }
        closetable();
    }
}
コード例 #20
0
ファイル: bbcodes.php プロジェクト: necrophcodr/Muks
    if ($_GET['page'] == 2) {
        if (isset($_POST['post_test'])) {
            $test_message = stripinput($_POST['test_message']);
            $smileys_checked = isset($_POST['test_smileys']) || preg_match("#(\\[code\\](.*?)\\[/code\\]|\\[geshi=(.*?)\\](.*?)\\[/geshi\\]|\\[php\\](.*?)\\[/php\\])#si", $test_message) ? " checked='checked'" : "";
            opentable($locale['417']);
            if (!$smileys_checked) {
                echo parseubb(parsesmileys($test_message));
            } else {
                echo parseubb($test_message);
            }
            closetable();
        } else {
            $test_message = "";
            $smileys_checked = "";
        }
        include LOCALE . LOCALESET . "comments.php";
        opentable($locale['401']);
        echo $navigation;
        echo "<form name='inputform' method='post' action='" . FUSION_SELF . $aidlink . "&amp;page=2'>\n";
        echo "<table cellspacing='0' cellpadding='0' class='center'>\n<tr>\n";
        echo "<td align='center' class='tbl'><textarea name='test_message' cols='60' rows='6' class='textbox' style='width:400px'>" . $test_message . "</textarea><br />\n";
        require_once INCLUDES . "bbcode_include.php";
        echo display_bbcodes("400px", "test_message");
        echo "</td>\n</tr>\n<tr>\n";
        echo "<td align='center' class='tbl'><label><input type='checkbox' name='test_smileys' value='1' " . $smileys_checked . " />" . $locale['418'] . "</label><br /><br />\n";
        echo "<input type='submit' name='post_test' value='" . $locale['401'] . "' class='button' /></td>\n";
        echo "</tr>\n</table>\n</form>\n";
        closetable();
    }
}
require_once THEMES . "templates/footer.php";
コード例 #21
0
ファイル: messages.php プロジェクト: caveman4572/PHP-Fusion
 echo "</td>\n<td class='tbl1' align='right'>\n";
 if (iADMIN && !isset($_GET['msg_id'])) {
     echo "<label><input name='chk_sendtoall' type='checkbox' " . $sendtoall_chk . " />\n";
     echo "" . $locale['434'] . ":</label> <select name='msg_to_group' class='textbox'>\n" . $user_types . "</select>\n";
 }
 echo "</td>\n</tr>\n";
 echo "<tr>\n<td align='right' class='tbl2' style='white-space:nowrap'>" . $locale['405'] . ":</td>\n";
 echo "<td class='tbl1' colspan='2'><input type='text' name='subject' value='" . $subject . "' maxlength='32' class='textbox' style='width:250px;' /></td>\n</tr>\n";
 if ($reply_message) {
     echo "<tr>\n<td align='right' class='tbl2' valign='top' style='white-space:nowrap'>" . $locale['422'] . ":</td>\n";
     echo "<td class='tbl1' colspan='2'>" . nl2br(parseubb($reply_message)) . "</td>\n</tr>\n";
 }
 echo "<tr>\n<td align='right' class='tbl2' valign='top' style='white-space:nowrap'>" . ($reply_message ? $locale['433'] : $locale['422']) . ":</td>\n";
 echo "<td class='tbl1' colspan='2'><textarea name='message' cols='75' rows='15' class='textbox' style='width:98%'>" . $message . "</textarea></td>\n</tr>\n";
 echo "<tr>\n<td align='right' class='tbl2' valign='top'></td>\n<td class='tbl1' colspan='2'>\n";
 echo display_bbcodes("98%", "message") . "</td>\n</tr>\n";
 echo "<tr>\n<td align='right' class='tbl2' valign='top' style='white-space:nowrap'>" . $locale['425'] . ":</td>\n";
 echo "<td class='tbl1' colspan='2'>\n<label><input type='checkbox' name='chk_disablesmileys' value='y'" . $disablesmileys_chk . " />" . $locale['427'] . "</label></td>\n</tr>\n";
 echo "</table>\n";
 echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
 echo "<tr>\n<td class='tbl'><a href='" . FUSION_SELF . "?folder=inbox'>" . $locale['435'] . "</a></td>\n";
 echo "<td align='right' class='tbl'>\n<input type='submit' name='send_preview' value='" . $locale['429'] . "' class='button' />\n";
 echo "<input type='submit' name='send_message' value='" . $locale['430'] . "' class='button' />\n</td>\n</tr>\n";
 echo "</table>\n</form>\n";
 closetable();
 echo "<script type='text/javascript'>\n";
 echo "/* <![CDATA[ */\n";
 echo "function ValidateForm(frm){\n";
 echo "if (frm.subject.value == \"\" || frm.message.value == \"\"){\n";
 echo "alert(\"" . $locale['486'] . "\");return false;}\n";
 echo "}\n";
コード例 #22
0
        echo "Tour date must be in the future..";
    }
    if ($err == 4) {
        echo "Database error.";
    }
    if ($_GET['m'] == "success") {
        echo "Tour was added/updated successfuly.";
    }
    echo "</div>";
}
echo "<form name='inputform' method='post'>";
echo "<table width='100%'>";
echo "<tr><td class='tbl2' width='250'>Tour name:</td><td class='tbl1'><input type='text' name='tname' value='" . $tname . "' class='textbox' style='width:250px;' /></td></tr>";
echo "<tr><td class='tbl2' width='250'>Tour game:</td><td class='tbl1'><input type='text' name='tgame' value='" . $tgame . "' class='textbox' style='width:250px;' /></td></tr>";
echo "<tr><td class='tbl2' width='250'>Tour desc:</td><td class='tbl1'><textarea class='textbox' name='tdesc' rows='3' cols='40'>" . $tdesc . "</textarea>";
echo display_bbcodes("240px;", "tdesc", "inputform");
echo "</td></tr>";
echo "<tr><td class='tbl2'>Tour max players:</td><td class='tbl1'><select name='tmaxpl'><option value='8'" . ($tmaxpl == 8 ? " selected='selected'" : "") . ">8</option><option value='16'" . ($tmaxpl == 16 ? " selected='selected'" : "") . ">16</option><option value='32'" . ($tmaxpl == 32 ? " selected='selected'" : "") . ">32</option></select></td></tr>";
echo "<tr><td class='tbl2' width='250'>Tour date:</td><td class='tbl1'><select name='thour'>";
for ($i = 0; $i <= 23; $i++) {
    echo "<option value='" . $i . "'" . ($thour == $i ? " selected='selected'" : "") . ">" . $i . "</option>";
}
echo "</select> : <select name='tmin'>";
for ($i = 0; $i <= 9; $i++) {
    $x = "0" . $i;
    echo "<option value='" . $x . "'" . ($x == $tmin ? " selected='selected'" : "") . ">" . $x . "</option>";
}
for ($i = 10; $i <= 59; $i++) {
    echo "<option value='" . $i . "'" . ($i == $tmin ? " selected='selected'" : "") . ">" . $i . "</option>";
}
echo "</select> <select name='tday'>";
コード例 #23
0
ファイル: user_sig_include.php プロジェクト: roniwahyu/AKEUDA
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: user_sig_include.php
| Author: Digitanium
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
if ($profile_method == "input") {
    require_once INCLUDES . "bbcode_include.php";
    echo "<tr>\n";
    echo "<td valign='top' class='tbl'>" . $locale['uf_sig'] . "</td>\n";
    echo "<td class='tbl'><textarea name='user_sig' cols='60' rows='5' class='textbox' style='width:295px'>" . (isset($user_data['user_sig']) ? $user_data['user_sig'] : "") . "</textarea><br />\n";
    echo display_bbcodes("300px", "user_sig", "inputform", "smiley|b|i|u||center|small|url|mail|img|color") . "</td>\n";
    echo "</tr>\n";
} elseif ($profile_method == "display") {
    // Not shown in profile
} elseif ($profile_method == "validate_insert") {
    $db_fields .= ", user_sig";
    $db_values .= ", '" . (isset($_POST['user_sig']) ? stripinput(trim($_POST['user_sig'])) : "") . "'";
} elseif ($profile_method == "validate_update") {
    $db_values .= ", user_sig='" . (isset($_POST['user_sig']) ? stripinput(trim($_POST['user_sig'])) : "") . "'";
}
コード例 #24
0
function showcomments_avatar($ctype, $cdb, $ccol, $cid, $clink, $seo_root_link = "", $a = "-", $seo_catid = "", $b = "-page-", $rowstart = "", $c = "-", $seo_subject = "")
{
    // Pimped
    global $settings, $locale, $userdata, $aidlink;
    if (URL_REWRITE && $seo_root_link != "") {
        $seo_link = $seo_root_link . $a . $seo_catid . $c . clean_subject_urlrewrite($seo_subject) . ".html";
    }
    // Pimped
    $link = FUSION_SELF . (FUSION_QUERY ? "?" . FUSION_QUERY : "");
    $link = preg_replace("^(&amp;|\\?)c_action=(edit|delete)&amp;comment_id=\\d*^", "", $link);
    if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "delete") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
        if ((iMODERATOR || iADMIN) && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . (int) $_GET['comment_id'] . "' AND comment_name='" . (int) $userdata['user_id'] . "'")) {
            $result = dbquery("DELETE FROM " . DB_COMMENTS . " WHERE comment_id='" . (int) $_GET['comment_id'] . "'" . (iMODERATOR || iADMIN ? "" : " AND comment_name='" . (int) $userdata['user_id'] . "'"));
        }
        redirect($clink);
    }
    if ($settings['comments_enabled'] == "1") {
        if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) {
            if (iMEMBER) {
                $comment_name = $userdata['user_id'];
            } elseif ($settings['guestposts'] == "1") {
                $comment_name = trim(stripinput($_POST['comment_name']));
                $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
                if (isnum($comment_name)) {
                    $comment_name = "";
                }
                include_once INCLUDES . "securimage/securimage.php";
                $securimage = new Securimage();
                if (!isset($_POST['com_captcha_code']) || $securimage->check($_POST['com_captcha_code']) == false) {
                    redirect($link);
                }
            }
            $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
            if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
                $comment_updated = false;
                if ((iMODERATOR || iADMIN) && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . (int) $_GET['comment_id'] . "' AND comment_item_id='" . $cid . "' AND comment_type='" . $ctype . "' AND comment_name='" . (int) $userdata['user_id'] . "' AND comment_hidden='0'")) {
                    if ($comment_message) {
                        $result = dbquery("UPDATE " . DB_COMMENTS . " SET comment_message=" . _db($comment_message) . " WHERE comment_id='" . (int) $_GET['comment_id'] . "'" . (iMODERATOR || iADMIN ? "" : " AND comment_name='" . (int) $userdata['user_id'] . "'"));
                        $comment_updated = true;
                    }
                }
                if ($comment_updated) {
                    $c_start = (ceil(dbcount("(comment_id)", DB_COMMENTS, "comment_id<='" . (int) $_GET['comment_id'] . "' AND comment_item_id=" . _db($cid) . " AND comment_type=" . _db($ctype) . "") / 10) - 1) * 10;
                }
                redirect($clink . "&amp;c_start=" . (isset($c_start) && isnum($c_start) ? $c_start : ""));
            } else {
                if (!dbcount("(" . $ccol . ")", $cdb, $ccol . "='" . $cid . "'")) {
                    redirect(BASEDIR . "index.php");
                }
                if ($comment_name && $comment_message) {
                    require_once INCLUDES . "flood_include.php";
                    if (!flood_control("comment_datestamp", DB_COMMENTS, "comment_ip='" . USER_IP . "'")) {
                        $result = dbquery("INSERT INTO " . DB_COMMENTS . " (comment_item_id, comment_type, comment_name, comment_message, comment_datestamp, comment_ip, comment_hidden) VALUES (" . _db($cid) . ", " . _db($ctype) . ", " . _db($comment_name) . ", " . _db($comment_message) . ", '" . time() . "', '" . USER_IP . "', '0')");
                    }
                }
                $c_start = (ceil(dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . (int) $cid . "' AND comment_type=" . _db($ctype) . "") / 10) - 1) * 10;
                redirect($clink . "&amp;c_start=" . $c_start);
            }
        }
        opentable($locale['c100']);
        echo "<a id='comments' name='comments'></a>";
        $c_rows = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id=" . _db($cid) . " AND comment_type=" . _db($ctype) . " AND comment_hidden='0'");
        if (!isset($_GET['c_start']) && $c_rows > 10) {
            $_GET['c_start'] = (ceil($c_rows / 10) - 1) * 10;
        }
        if (!isset($_GET['c_start']) || !isnum($_GET['c_start'])) {
            $_GET['c_start'] = 0;
        }
        $result = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_datestamp, tcm.comment_message,\r\n\t\t\ttcu.user_name, tcu.user_avatar, tcu.user_id, tcu.user_level, tcu.user_status\r\n\t\t\tFROM " . DB_COMMENTS . " tcm\r\n\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\r\n\t\t\tWHERE comment_item_id=" . _db($cid) . " AND comment_type=" . _db($ctype) . " AND comment_hidden='0'\r\n\t\t\tORDER BY comment_datestamp ASC LIMIT " . (int) $_GET['c_start'] . ",10");
        if (dbrows($result)) {
            $i = $_GET['c_start'] + 1;
            if ($c_rows > 10) {
                echo "<div style='text-align:center;margin-bottom:5px;'>" . makecommentnav($_GET['c_start'], 10, $c_rows, 3, $clink . "&amp;", $seo_root_link, $a, $seo_catid, $b, $rowstart, "-cstart-", $c, $seo_subject) . "</div>\n";
            }
            echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
            while ($data = dbarray($result)) {
                echo "<tr><td class='tbl2' width='10%' align='center'>\n";
                if ($data['user_name']) {
                    echo "<span class='comment-name'>" . profile_link($data['comment_name'], $data['user_name'], $data['user_status']) . "</span>\n";
                } else {
                    echo "<span class='comment-name'>" . $data['comment_name'] . "</span>\n";
                }
                echo "</td>\n";
                echo "<td class='tbl2'>\n<span class='small'>" . $locale['global_071'] . showdate("longdate", $data['comment_datestamp']) . "</span>\n";
                echo "<div style='float:right' class='comment_actions'>";
                if ((iMODERATOR || iADMIN) && checkrights("C") || iMEMBER && $data['comment_name'] == $userdata['user_id'] && isset($data['user_name'])) {
                    echo "<!--comment_actions-->\n<a href='" . FUSION_SELF . "?" . FUSION_QUERY . "&amp;c_action=edit&amp;comment_id=" . $data['comment_id'] . "#edit_comment'>" . $locale['c108'] . "</a> |\n";
                    echo "<a href='" . FUSION_SELF . "?" . FUSION_QUERY . "&amp;c_action=delete&amp;comment_id=" . $data['comment_id'] . "'>" . $locale['c109'] . "</a> |\n";
                }
                echo "<a href='" . FUSION_REQUEST . "#c" . $data['comment_id'] . "' id='c" . $data['comment_id'] . "' name='c" . $data['comment_id'] . "'>#" . $i . "</a></div>\n";
                echo "</td>\n";
                echo "</tr>\n<tr>\n";
                $avatar = $data['user_avatar'] != "" && file_exists(IMAGES_AVA . $data['user_avatar']) ? IMAGES_AVA . $data['user_avatar'] : IMAGES_AVA . "noavatar.jpg";
                echo "<td class='tbl1' width='15%'>\n";
                echo "<div style='text-align:center;'><img src='" . $avatar . "' width='50' height='50' alt='' /></div><br />\n";
                if ($settings['warning_system_comments'] && $data['user_name']) {
                    $points = show_warning_points($data['user_id']);
                    echo "<div class='commentswarnings'>";
                    echo "<span class='small'><a style='cursor:help;' onclick=\"warning_info();\">" . $locale['WARN200'] . "</a></span> ";
                    echo warning_profile_link("1", $data['user_id'], $points);
                    echo "</div>";
                }
                echo "<span class='small2'>" . $locale['c110'] . number_format(dbcount("(comment_id)", DB_COMMENTS, "comment_name='" . (int) $data['user_id'] . "'")) . "<br />";
                echo $locale['c111'] . getuserlevel($data['user_level']) . "</span><br />";
                echo "</td>\n";
                echo "<td class='tbl2' valign='top'>\n" . nl2br(parseubb(parsesmileys($data['comment_message']))) . "</td>\n</tr>";
                $i++;
            }
            echo "\n</table>\n";
            if ((iMODERATOR || iADMIN) && checkrights("C")) {
                echo "<div align='right' class='tbl2'><a href='" . ADMIN . "comments.php" . $aidlink . "&amp;ctype={$ctype}&amp;cid={$cid}'>" . $locale['c106'] . "</a></div>\n";
            }
            if ($c_rows > 10) {
                echo "<br /><div style='text-align:center;margin-top:5px;'>" . makecommentnav($_GET['c_start'], 10, $c_rows, 3, $clink . "&amp;", $seo_root_link, $a, $seo_catid, $b, $rowstart, "-cstart-", $c, $seo_subject) . "</div>\n";
            }
        } else {
            echo $locale['c101'] . "\n";
        }
        closetable();
        opentable($locale['c102']);
        if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
            $eresult = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcu.user_name FROM " . DB_COMMENTS . " tcm\r\n\t\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\r\n\t\t\t\tWHERE comment_id='" . (int) $_GET['comment_id'] . "' AND comment_item_id=" . _db($cid) . " AND comment_type=" . _db($ctype) . " AND comment_hidden='0'");
            if (dbrows($eresult)) {
                $edata = dbarray($eresult);
                if ((iMODERATOR || iADMIN) && checkrights("C") || iMEMBER && $edata['comment_name'] == $userdata['user_id'] && isset($edata['user_name'])) {
                    $clink .= "&amp;c_action=edit&amp;comment_id=" . $edata['comment_id'];
                    $comment_message = $edata['comment_message'];
                }
            } else {
                $comment_message = "";
            }
        } else {
            $comment_message = "";
        }
        if (iMEMBER || $settings['guestposts'] == "1") {
            require_once INCLUDES . "bbcode_include.php";
            echo "<a id='edit_comment' name='edit_comment'></a>\n";
            echo "<form name='inputform' method='post' action='" . (URL_REWRITE && $seo_root_link != "" ? $seo_link : $clink) . "'>\n";
            // Pimped
            if (iGUEST) {
                echo "<div align='center' class='tbl'>\n" . $locale['c104'] . "<br />\n";
                echo "<input type='text' name='comment_name' maxlength='30' class='textbox' style='width:360px' />\n";
                echo "</div>\n";
            }
            echo "<div align='center' class='tbl'>\n";
            echo "<textarea name='comment_message' cols='70' rows='6' class='textbox' style='width:360px'>" . $comment_message . "</textarea><br />\n";
            echo display_bbcodes("360px", "comment_message");
            if (iGUEST) {
                echo $locale['global_158'] . "<br />\n";
                echo "<img id='com_captcha' src='" . INCLUDES . "securimage/securimage_show.php' alt='' /><br />\n";
                echo "<a href='" . INCLUDES . "securimage/securimage_play.php'><img src='" . INCLUDES . "securimage/images/audio_icon.gif' alt='' class='tbl-border' style='margin-bottom:1px' /></a>\n";
                echo "<a href='#' onclick=\"document.getElementById('com_captcha').src = '" . INCLUDES . "securimage/securimage_show.php?sid=' + Math.random(); return false\"><img src='" . INCLUDES . "securimage/images/refresh.gif' alt='' class='tbl-border' /></a><br />\n";
                echo $locale['global_159'] . "<br />\n<input type='text' name='com_captcha_code' class='textbox' style='width:100px' />\n";
            }
            echo "<br />\n<input type='submit' name='post_comment' value='" . ($comment_message ? $locale['c103'] : $locale['c102']) . "' class='button' />\n";
            echo "</div>\n</form>\n";
        } else {
            echo $locale['c105'] . "\n";
        }
        closetable();
    }
}
コード例 #25
0
ファイル: viewthread.php プロジェクト: simplyianm/clububer
    if (!$fdata['thread_locked'] && $can_reply) {
        echo "<a href='post.php?action=reply&amp;forum_id=" . $fdata['forum_id'] . "&amp;thread_id=" . $_GET['thread_id'] . "'><img src='" . get_image("reply") . "' alt='" . $locale['565'] . "' style='border:0px' /></a>\n";
    }
    if ($can_post) {
        echo "<a href='post.php?action=newthread&amp;forum_id=" . $fdata['forum_id'] . "'><img src='" . get_image("newthread") . "' alt='" . $locale['566'] . "' style='border:0px' /></a>\n";
    }
    echo "</td>\n</tr>\n</table>\n";
}
closetable();
if (iMEMBER && $can_reply && !$fdata['thread_locked']) {
    require_once INCLUDES . "bbcode_include.php";
    opentable($locale['512']);
    echo "<form name='inputform' method='post' action='" . FUSION_SELF . "?thread_id=" . $_GET['thread_id'] . "'>\n";
    echo "<table cellpadding='0' cellspacing='1' class='tbl-border center'>\n<tr>\n";
    echo "<td align='center' class='tbl1'><textarea name='message' cols='70' rows='7' class='textbox' style='width:98%'></textarea><br />\n";
    echo display_bbcodes("360px", "message") . "</td>\n";
    echo "</tr>\n<tr>\n";
    echo "<td align='center' class='tbl2'><label><input type='checkbox' name='disable_smileys' value='1' />" . $locale['513'] . "</label></td>\n";
    echo "</tr>\n<tr>\n";
    echo "<td align='center' class='tbl1'><input type='submit' name='postquickreply' value='" . $locale['514'] . "' class='button' /></td>\n";
    echo "</tr>\n</table>\n</form><!--sub_forum_thread-->\n";
    closetable();
}
echo "<script type='text/javascript'>function jumpforum(forum_id) {\n";
echo "document.location.href='" . FORUM . "viewforum.php?forum_id='+forum_id;\n";
echo "}\n" . "function setChecked(frmName,chkName,val) {\n";
echo "dml=document.forms[frmName];\n" . "len=dml.elements.length;\n" . "for(i=0;i < len;i++) {\n";
echo "if(dml.elements[i].name == chkName) {\n" . "dml.elements[i].checked = val;\n}\n}\n}\n";
echo "</script>\n";
list($postcount, $lastpid) = dbarraynum(dbquery("SELECT COUNT(post_id), MAX(post_id) FROM " . DB_POSTS . " WHERE thread_id='" . $_GET['thread_id'] . "' GROUP BY thread_id"));
if (isnum($postcount)) {
コード例 #26
0
 $visibility_opts = "";
 $sel = "";
 $user_groups = getusergroups(1, 1, 1, 1, 1, 1);
 // Pimped
 while (list($key, $user_group) = each($user_groups)) {
     $sel = $link_visibility == $user_group['0'] ? " selected='selected'" : "";
     $visibility_opts .= "<option value='" . $user_group['0'] . "'{$sel}>" . $user_group['1'] . "</option>\n";
 }
 require_once INCLUDES . "bbcode_include.php";
 echo "<form name='layoutform' method='post' action='" . $formaction . "'>\n";
 echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
 echo "<td class='tbl'>" . $locale['420'] . "</td>\n";
 echo "<td class='tbl'><input type='text' name='link_name' value='" . $link_name . "' maxlength='100' class='textbox' style='width:240px;' /><br />\n";
 echo "</td>\n</tr>\n<tr>\n";
 echo "<td class='tbl'></td>\n<td class='tbl'>";
 echo display_bbcodes("240px;", "link_name", "layoutform", "b|i|u|color") . "\n";
 echo "</td>\n</tr>\n<tr>\n";
 echo "<td class='tbl'>" . $locale['421'] . "</td>\n";
 echo "<td class='tbl'><input type='text' name='link_url' value='" . $link_url . "' maxlength='200' class='textbox' style='width:240px;' /></td>\n";
 echo "</tr>\n<tr>\n";
 echo "<td class='tbl'>" . $locale['430'] . "</td>\n";
 // Pimped: Seo Site Link
 echo "<td class='tbl'><input type='text' name='link_seo_url' value='" . $link_seo_url . "' maxlength='200' class='textbox' style='width:240px;' /><br /><span class='small'>(" . $locale['431'] . ")</span></td>\n";
 echo "</tr>\n<tr>\n";
 echo "<td class='tbl'>" . $locale['422'] . "</td>\n";
 echo "<td class='tbl'><select name='link_visibility' class='textbox' style='width:150px;'>\n" . $visibility_opts . "</select>\n";
 echo $locale['423'] . "\n<input type='text' name='link_order'  value='" . $link_order . "' maxlength='2' class='textbox' style='width:40px;' />";
 echo "</td>\n</tr>\n<tr>\n";
 if (IF_MULTI_LANGUAGE) {
     // Pimped
     echo "<td class='tbl'>" . $locale['432'] . "</td>\n";
コード例 #27
0
ファイル: submissions.php プロジェクト: WuChEn/PHP-Fusion
 echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
 echo "<td class='tbl'>" . $locale['645'] . "</td>\n";
 echo "<td width='80%' class='tbl'><input type='text' name='download_title' value='" . $submit_criteria['download_title'] . "' class='textbox' style='width: 250px' /></td>\n";
 echo "</tr>\n";
 echo "<tr>\n<td class='tbl1' style='width:80px;vertical-align:top;'>" . $locale['646b'] . "<br /><br />";
 echo "<span id='shortdesc_display' style='padding: 1px 3px 1px 3px; border:1px solid; display:none;'>";
 echo "<strong>" . (500 - mb_strlen($submit_criteria['download_description_short'])) . "</strong>";
 echo "</span>";
 echo "</td>\n";
 echo "<td class='tbl1'><textarea name='download_description_short' cols='60' rows='4' class='textbox' style='width:380px;' onKeyDown=\"shortdesc_counter(this,'shortdesc_display',500);\" onKeyUp=\"shortdesc_counter(this,'shortdesc_display',500);\">" . $submit_criteria['download_description_short'] . "</textarea></td>\n";
 echo "</tr>\n";
 echo "<tr>\n<td class='tbl1' style='width:80px; vertical-align:top;'>" . $locale['646'] . "</td>\n";
 echo "<td class='tbl1'><textarea name='download_description' cols='60' rows='5' class='textbox' style='width:380px;'>" . $submit_criteria['download_description'] . "</textarea></td>\n";
 echo "</tr>\n";
 echo "<tr>\n<td class='tbl1'></td><td class='tbl1'>\n";
 echo display_bbcodes("100%", "download_description", "downloadform") . "</td>\n";
 echo "</tr>\n<tr>\n";
 if (!empty($submit_criteria['download_file'])) {
     echo "<td class='tbl1' style='width:80px; vertical-align:top;'>" . $locale['647b'] . "</td>\n<td class='tbl1' style='vertical-align:top;'>\n";
     echo "<a href='" . DOWNLOADS . "submissions/" . $submit_criteria['download_file'] . "'>" . DOWNLOADS . "submissions/" . $submit_criteria['download_file'] . "</a><br />\n";
     echo "</td>\n</tr>\n";
 } else {
     echo "<tr>\n<td class='tbl1' style='width:80px;'>" . $locale['647'] . "</td>\n";
     echo "<td class='tbl1'><input type='text' name='download_url' value='" . $submit_criteria['download_url'] . "' class='textbox' style='width:380px;' /></td>\n";
     echo "</tr>\n";
 }
 if (!empty($submit_criteria['download_image']) && !empty($submit_criteria['download_image_thumb'])) {
     echo "<tr>\n";
     echo "<td class='tbl1' style='width:80px; vertical-align:top;'>" . $locale['653'] . "</td>\n<td class='tbl1' style='vertical-align:top;'>\n";
     echo "<a href='" . DOWNLOADS . "submissions/images/" . $submit_criteria['download_image'] . "' target='_blank'>";
     echo "<img src='" . DOWNLOADS . "submissions/images/" . $submit_criteria['download_image_thumb'] . "' alt='' /></a><br />\n";
コード例 #28
0
echo "<select name='sma_all' class='textbox'>";
echo "<option value='0'" . ($data_sm['sma_all'] == "0" ? " selected" : "") . ">" . $locale['sma201'] . "</option>";
echo "<option value='1'" . ($data_sm['sma_all'] == "1" ? " selected" : "") . ">" . $locale['sma200'] . "</option>";
echo "</select></td>\n";
echo "<td class='tbl' align='center'>\n";
if ($data_sm['sma_all'] == 0) {
    echo "{$showgreen}";
} else {
    echo "{$showred}";
}
echo "</td>\n</tr>\n";
//************************************ Maintenance Message *******************************************
echo "<tr><td colspan='3'><hr></td></tr>\n";
echo "<tr><td width='40%'valign='top' class='tbl2'><b>" . $locale['sma209'] . "</b></td><td colspan='2' class='tbl2' align='right'>";
echo "<textarea name='sma_message' rows='4' cols='44' class='textbox' style='width:300px;' />" . stripslashes($data_sm['sma_message']) . "</textarea><br />";
echo display_bbcodes("340px", "sma_message", "sectionmaint", "smiley|b|i|u|left|center|right|small|big|color") . "\n";
echo "</td></tr><tr>\n";
//************************************ Optionals *******************************************
echo "<tr><td colspan='3'><hr></td></tr>\n";
echo "<tr><td width='40%' colspan='3'class='tbl'><b>" . $locale['sma210'] . "</b><br /></td>";
echo "</tr\n><tr>\n";
echo "<td class='tbl2'colspan='3' align='left'>\n";
echo "<b>" . $locale['sma233'] . "</b>&nbsp;";
echo "&nbsp;<label><input type='radio' name='sma_temp' value='0'" . ($data_sm['sma_temp'] == "0" ? " checked='checked'" : "") . " />&nbsp;" . $locale['sma216'] . "</label>";
echo "&nbsp;<label><input type='radio' name='sma_temp' value='1'" . ($data_sm['sma_temp'] == "1" ? " checked='checked'" : "") . " />&nbsp;" . $locale['sma217'] . "</label>";
echo "</td>\n";
echo "</tr><tr>\n";
echo "<td class='tbl2'colspan='3' align='left'>\n";
echo "<b>" . $locale['sma303'] . " " . $locale['sma304'] . "</b>&nbsp;&nbsp;<input type='text' name='sma_time' size='2' value='" . $data_sm['sma_time'] . "' class='textbox' style='width:20px;' />\n";
echo "<select name='sma_period' class='textbox'>";
echo "<option value='0'" . ($data_sm['sma_period'] == "0" ? " selected" : "") . ">" . $locale['sma220'] . "</option>";