Пример #1
0
 /**
  * New message form
  */
 public function pm_mainForm()
 {
     global $locale;
     $_GET['msg_send'] = isset($_GET['msg_send']) ? $_GET['msg_send'] : "";
     if (iADMIN) {
         $input_header = "<a class='pull-right m-b-10 display-inline-block' id='mass_send'>" . $locale['434'] . "</a><br/>";
         $input_header .= form_user_select("msg_send", $locale['420a'], $_GET['msg_send'], array("required" => TRUE, "inline" => TRUE, 'placeholder' => $locale['421']));
         $input_header .= "<div id='msg_to_group-field' class='form-group display-none'>\n";
         $input_header .= "<label for='mg_to_group' class='control-label col-xs-12 col-sm-3 col-md-3 col-lg-3 p-l-0'>" . $locale['434'] . "\n\t\t\t\t\t\t\t\t<input id='all_check' name='chk_sendtoall' type='checkbox' class='pull-left display-inline-block'\n\t\t\t\t\t\t\t   style='margin-right:10px !important;'/></label>\n";
         $input_header .= "<div class='col-xs-12 col-sm-9 col-md-9 col-lg-9'>\n";
         $user_groups = fusion_get_groups();
         unset($user_groups[0]);
         $input_header .= form_select('msg_group_send', "", "", array('options' => $user_groups, 'width' => "100%", 'class' => 'm-b-0'));
         $input_header .= "</div>\n</div>\n";
         // Toggle "Send to All" link
         add_to_jquery("\n\t\t\t\t\$('#mass_send').bind('click', function() {\n\t\t\t\t\$('#msg_to_group-field').toggleClass('display-none');\n\t\t\t\t\$('#msg_send-field').toggleClass('display-none');\n\t\t\t\tvar invisible = \$('#msg_to_group-field').hasClass('display-none');\n\t\t\t\tif (invisible) {\n\t\t\t\t\t\$('#all_check').prop('checked', false);\n\t\t\t\t} else {\n\t\t\t\t\t\$('#all_check').prop('checked', true);\n\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t");
     } else {
         $input_header = form_user_select("msg_send", $locale['420a'], $_GET['msg_send'], array("required" => TRUE, 'input_id' => 'msgsend2', "inline" => TRUE, 'placeholder' => $locale['421']));
     }
     $this->info['reply_form'] = openform('inputform', 'post', BASEDIR . "messages.php?folder=" . $_GET['folder'] . "&amp;msg_send=" . $_GET['msg_send']) . $input_header . form_text('subject', $locale['405'], '', array("required" => TRUE, "inline" => TRUE, 'max_length' => 100, "autocomplete_off" => TRUE, "width" => "100%", 'placeholder' => $locale['405'])) . form_textarea('message', $locale['422'], '', array("required" => TRUE, 'error_text' => '', 'autosize' => 1, 'no_resize' => 0, 'preview' => 1, 'form_name' => 'inputform', "height" => "150px", 'bbcode' => 1)) . form_button('cancel', $locale['cancel'], $locale['cancel']) . form_button('send_pm', $locale['430'], $locale['430'], array('class' => 'btn m-l-10 btn-primary')) . closeform();
 }
Пример #2
0
function user_posts_migrate_console()
{
    global $aidlink, $locale;
    $result = dbquery("SELECT user_id, user_name FROM " . DB_USERS . "");
    if (dbrows($result) > 0) {
        while ($user_data = dbarray($result)) {
            $data[$user_data['user_id']] = "" . $user_data['user_name'] . "";
        }
    } else {
        $data['0'] = $locale['124'];
    }
    echo openform('inputform', 'post', "" . FUSION_SELF . $aidlink . "", array('max_tokens' => 1));
    echo "<table style='width:100%' class='table table-striped'>\n";
    echo "<thead>\n";
    echo "<tr style='height:30px;'><th style='width:33%; text-align:left'>" . $locale['125'] . "</th><th style='width:33%; text-align:left;'>" . $locale['126'] . "</th><th class='text-left'>&nbsp;</th>\n</tr>\n";
    echo "</thead>\n";
    echo "<tbody>\n";
    echo "<tr>\n";
    echo "<td>\n";
    echo form_user_select('user_primary', '', isset($_POST['user_primary']) && isnum($_POST['user_primary'] ?: ''), array('placeholder' => $locale['127']));
    echo "</td>\n";
    echo "<td>\n";
    echo form_user_select('user_migrate', '', isset($_POST['user_migrate']) && isnum($_POST['user_migrate'] ?: ''), array('placeholder' => $locale['128']));
    echo "</td>\n";
    echo "<td>\n";
    echo form_button('migrate', $locale['129'], $locale['129'], array('inline' => '1', 'class' => 'btn btn-sm btn-primary'));
    echo "</td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td>" . $locale['130'] . "</td>";
    echo "<td colspan='2'>\n";
    echo "<input type='checkbox' name='comments' value='1' " . (isset($_POST['comments']) == '1' ? 'checked' : '') . "> " . $locale['132'] . "<br />";
    echo "<input type='checkbox' name='ratings' value='1' " . (isset($_POST['ratings']) == '1' ? 'checked' : '') . "> " . $locale['133'] . "<br />";
    echo "<input type='checkbox' name='polls' value='1' " . (isset($_POST['polls']) == '1' ? 'checked' : '') . "> " . $locale['134'] . "<br />";
    echo "<input type='checkbox' name='messages' value='1' " . (isset($_POST['messages']) == '1' ? 'checked' : '') . "> " . $locale['136'] . "<br />";
    echo "<input type='checkbox' name='user_level' value='1' " . (isset($_POST['user_level']) == '1' ? 'checked' : '') . "> " . $locale['142'] . "<br />";
    if (db_exists(DB_FORUMS)) {
        echo "<input type='checkbox' name='forum' value='1' " . (isset($_POST['forum']) == '1' ? 'checked' : '') . "> " . $locale['131'] . "<br />\n";
    }
    if (db_exists(DB_ARTICLES)) {
        echo "<input type='checkbox' name='articles' value='1' " . (isset($_POST['articles']) == '1' ? 'checked' : '') . "> " . $locale['137'] . "<br />";
    }
    if (db_exists(DB_NEWS)) {
        echo "<input type='checkbox' name='news' value='1' " . (isset($_POST['news']) == '1' ? 'checked' : '') . "> " . $locale['138'] . "<br />";
    }
    if (db_exists(DB_BLOG)) {
        echo "<input type='checkbox' name='blog' value='1' " . (isset($_POST['blog']) == '1' ? 'checked' : '') . "> " . $locale['139'] . "<br />";
    }
    if (db_exists(DB_DOWNLOADS)) {
        echo "<input type='checkbox' name='downloads' value='1' " . (isset($_POST['downloads']) == '1' ? 'checked' : '') . "> " . $locale['140'] . "<br />";
    }
    if (db_exists(DB_PHOTOS)) {
        echo "<input type='checkbox' name='photos' value='1' " . (isset($_POST['photos']) == '1' ? 'checked' : '') . "> " . $locale['141'] . "<br />";
    }
    $shoutbox = dbcount("(inf_id)", DB_INFUSIONS, "inf_folder='shoutbox_panel'");
    if ($shoutbox > 0) {
        echo "<input type='checkbox' name='shoutbox' value='1' " . (isset($_POST['shoutbox']) == '1' ? 'checked' : '') . "> " . $locale['135'] . "<br />";
    }
    echo "</td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td>" . $locale['143'] . "</td>";
    echo "<td colspan='3'>\n";
    echo "<input type='checkbox' name='del_user' value='1'> " . $locale['144'] . "<br /> " . $locale['145'] . "\n";
    echo "</td>\n";
    echo "</tr>\n";
    echo "</tbody>\n";
    echo "</table>\n";
    echo closeform();
}
Пример #3
0
    if (isset($user_data['user_blacklist']) && $user_data['user_blacklist']) {
        $user_blacklist = $user_data['user_blacklist'];
    } else {
        $user_blacklist = "";
    }
    // read back.
    echo "<tr>\n";
    echo "<td class='tbl" . $this->getErrorClass("user_blacklist") . "'>";
    echo "<label for='user_blacklist'>" . $locale['uf_blacklist'] . $required . "</label></td>\n";
    echo "<td class='tbl" . $this->getErrorClass("user_blacklist") . "'>";
    echo "<p>" . $locale['uf_blacklist_message'] . "</p>";
    echo "</td></tr>\n";
    echo "<tr>\n";
    echo "<td colspan='2' class='tbl" . $this->getErrorClass("user_blacklist") . "'>";
    echo "<div class='well'>\n";
    echo form_user_select('', 'user_blacklist', 'user_blacklist', '', '', array('placeholder' => $locale['uf_blacklist_desc']));
    echo "</div>\n";
    echo "</td></tr>\n";
    echo "<td colspan='2' class='tbl" . $this->getErrorClass("user_blacklist") . "'>";
    echo "<p><strong>" . $locale['uf_blacklist_000'] . "</strong></p>";
    $user_blacklist = array_filter(explode(".", $user_blacklist));
    show_blacklist($user_blacklist);
    echo "</td></tr>\n";
    if ($required) {
        $this->setRequiredJavaScript("user_blacklist", $locale['uf_blacklist_error']);
    }
    // Display in profile
} elseif ($profile_method == "display") {
    // do not show blacklist openly.
    echo "<tr>\n";
    echo "<td colspan='4'>Not available.</td>\n";