예제 #1
0
 /**
  * Displays forum mood form
  */
 private function displayMoodForm()
 {
     $locale = fusion_get_locale('', FORUM_ADMIN_LOCALE);
     fusion_confirm_exit();
     $this->post_Mood();
     $quantum = new QuantumFields();
     $groups = fusion_get_groups();
     unset($groups[0]);
     if (!empty($_GET['action'])) {
         $validMoodID = isset($_GET['mood_id']) && isnum($_GET['mood_id']) && !empty(dbcount('(mood_id)', DB_FORUM_MOODS, "mood_id=" . $_GET['mood_id'])) ? TRUE : FALSE;
         switch ($_GET['action']) {
             case 'edit':
                 if ($validMoodID) {
                     $query = "SELECT * FROM " . DB_FORUM_MOODS . " WHERE mood_id='" . intval($_GET['mood_id']) . "'";
                     $result = dbquery($query);
                     if (dbrows($result) > 0) {
                         $this->data = dbarray($result);
                     } else {
                         redirect(clean_request('', array('ref', 'mood_id'), FALSE));
                     }
                 } else {
                     redirect(clean_request('', array('ref', 'mood_id'), FALSE));
                 }
                 break;
             case 'delete':
                 if ($validMoodID) {
                     addNotice('success', $locale['forum_notice_014']);
                     dbquery("DELETE FROM " . DB_FORUM_MOODS . " WHERE mood_id='" . intval($_GET['mood_id']) . "'");
                 } else {
                     redirect(clean_request('', array('ref', 'mood_id'), FALSE));
                 }
                 break;
             default:
                 redirect(clean_request('', array('ref', 'mood_id'), FALSE));
         }
     }
     echo openform("mood_form", "POST", FUSION_REQUEST, array('class' => 'm-t-20 m-b-20')) . form_hidden('mood_id', '', $this->data['mood_id']) . $quantum->quantum_multilocale_fields('mood_name', $locale['forum_094'], $this->data['mood_name'], array('required' => TRUE, 'inline' => TRUE, 'placeholder' => $locale['forum_096'])) . $quantum->quantum_multilocale_fields('mood_description', $locale['forum_095'], $this->data['mood_description'], array('required' => TRUE, 'inline' => TRUE, 'placeholder' => $locale['forum_097'], 'ext_tip' => $locale['forum_098'])) . form_text('mood_icon', $locale['forum_099'], $this->data['mood_icon'], array('inline' => TRUE, 'width' => '350px')) . form_checkbox('mood_status', $locale['forum_100'], $this->data['mood_status'], array('options' => array($locale['forum_101'], $locale['forum_102']), 'inline' => TRUE, 'type' => 'radio')) . form_checkbox('mood_notify', $locale['forum_103'], $this->data['mood_notify'], array('options' => $groups, 'inline' => TRUE, 'type' => 'radio')) . form_checkbox('mood_access', $locale['forum_104'], $this->data['mood_access'], array('options' => $groups, 'inline' => TRUE, 'type' => 'radio')) . form_button('save_mood', !empty($this->data['mood_id']) ? $locale['forum_106'] : $locale['forum_105'], $locale['save_changes'], array('class' => 'btn-primary m-r-10')) . form_button('cancel_mood', $locale['cancel'], $locale['cancel']) . closeform();
 }
예제 #2
0
 echo form_select('article_keywords', $locale['articles_0204'], $callback_data['article_keywords'], array("max_length" => 320, "placeholder" => $locale['articles_0204a'], "width" => "100%", "error_text" => $locale['articles_0257'], "tags" => TRUE, "multiple" => TRUE));
 $snippetSettings = array("required" => TRUE, "preview" => TRUE, "html" => TRUE, "autosize" => TRUE, "form_name" => "inputform");
 if (fusion_get_settings("tinymce_enabled")) {
     $snippetSettings = array("required" => TRUE);
 }
 echo form_textarea('article_snippet', $locale['articles_0202'], $callback_data['article_snippet'], $snippetSettings);
 $extendedSettings = array();
 if (!fusion_get_settings("tinymce_enabled")) {
     $extendedSettings = array("preview" => TRUE, "html" => TRUE, "autosize" => TRUE, "form_name" => "inputform");
 }
 echo form_textarea('article_article', $locale['articles_0203'], $callback_data['article_article'], $extendedSettings);
 echo "</div>\n";
 echo "<div class='col-xs-12 col-sm-12 col-md-12 col-lg-4'>\n";
 openside("");
 echo form_select_tree("article_cat", $locale['articles_0201'], $callback_data['article_cat'], array("width" => "100%", "inline" => TRUE, "no_root" => TRUE, "query" => multilang_table("AR") ? "WHERE article_cat_language='" . LANGUAGE . "'" : ""), DB_ARTICLE_CATS, "article_cat_name", "article_cat_id", "article_cat_parent");
 echo form_select('article_visibility', $locale['articles_0211'], $callback_data['article_visibility'], array('options' => fusion_get_groups(), 'placeholder' => $locale['choose'], 'width' => '100%', "inline" => TRUE));
 if (multilang_table("AR")) {
     echo form_select('article_language', $locale['global_ML100'], $callback_data['article_language'], array('options' => fusion_get_enabled_languages(), 'width' => '100%', "inline" => TRUE));
 } else {
     echo form_hidden('article_language', '', $callback_data['article_language']);
 }
 echo form_hidden('article_datestamp', '', $callback_data['article_datestamp']);
 echo form_button('preview', $locale['articles_0240'], $locale['articles_0240'], array('class' => 'btn-default m-r-10'));
 echo form_button('publish', $locale['articles_0242'], $locale['articles_0242'], array('class' => 'btn-primary m-r-10'));
 closeside();
 openside("");
 echo "<label><input type='checkbox' name='article_draft' value='1'" . ($callback_data['article_draft'] ? "checked='checked'" : "") . " /> " . $locale['articles_0205'] . "</label><br />\n";
 if (fusion_get_settings("tinymce_enabled") != 1) {
     echo "<label><input type='checkbox' name='article_breaks' value='1'" . ($callback_data['article_breaks'] ? "checked='checked'" : "") . " /> " . $locale['articles_0206'] . "</label><br />\n";
 }
 closeside();
예제 #3
0
echo "<div class='row'>\n";
echo "<div class='col-xs-12 col-sm-12 col-md-7 col-lg-8'>\n";
echo form_hidden("blog_id", "", $data['blog_id']);
echo form_hidden("blog_datestamp", "", $data['blog_datestamp']);
echo form_text('blog_subject', $locale['blog_0422'], $data['blog_subject'], array('required' => TRUE, 'max_length' => 200, 'error_text' => $locale['blog_0450']));
// move keywords here because it's required
echo form_select('blog_keywords', $locale['blog_0443'], $data['blog_keywords'], array("max_length" => 320, "placeholder" => $locale['blog_0444'], "width" => "100%", "error_text" => $locale['blog_0457'], "tags" => TRUE, "multiple" => TRUE));
echo "<div class='pull-left m-r-10 display-inline-block'>\n";
echo form_datepicker('blog_start', $locale['blog_0427'], $data['blog_start'], array("placeholder" => $locale['blog_0429'], "join_to_id" => "blog_end"));
echo "</div>\n<div class='pull-left m-r-10 display-inline-block'>\n";
echo form_datepicker('blog_end', $locale['blog_0428'], $data['blog_end'], array("placeholder" => $locale['blog_0429'], "join_from_id" => "blog_start"));
echo "</div>\n";
echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-5 col-lg-4'>\n";
openside('');
echo form_select_tree("blog_cat[]", $locale['blog_0423'], $data['blog_cat'], array("width" => "100%", "delimiter" => ".", "inline" => TRUE, "no_root" => TRUE, "tags" => TRUE, "multiple" => TRUE, "query" => multilang_table("BL") ? "WHERE blog_cat_language='" . LANGUAGE . "'" : ""), DB_BLOG_CATS, "blog_cat_name", "blog_cat_id", "blog_cat_parent");
echo form_select('blog_visibility', $locale['blog_0430'], $data['blog_visibility'], array('options' => fusion_get_groups(), 'placeholder' => $locale['choose'], 'width' => '100%', "inline" => TRUE));
if (multilang_table("BL")) {
    echo form_select('blog_language', $locale['global_ML100'], $data['blog_language'], array('options' => fusion_get_enabled_languages(), 'placeholder' => $locale['choose'], 'width' => '100%', "inline" => TRUE));
} else {
    echo form_hidden('blog_language', '', $data['blog_language']);
}
echo form_button('cancel', $locale['cancel'], $locale['cancel'], array('class' => 'btn-default m-r-10'));
echo form_button('save', $locale['blog_0437'], $locale['blog_0437'], array('class' => 'btn-success', 'icon' => 'fa fa-square-check-o'));
closeside();
echo "</div>\n</div>\n";
$snippetSettings = array("required" => TRUE, "preview" => TRUE, "html" => TRUE, "autosize" => TRUE, "placeholder" => $locale['blog_0425a'], "form_name" => "inputform");
if (fusion_get_settings("tinymce_enabled")) {
    $snippetSettings = array("required" => TRUE, "type" => "tinymce", "tinymce" => "advanced");
}
echo form_textarea('blog_blog', $locale['blog_0425'], $data['blog_blog'], $snippetSettings);
$extendedSettings = array();
예제 #4
0
 /**
  * Permissions Form
  */
 private function display_forum_permissions_form()
 {
     $data = $this->data;
     $data += array('forum_id' => !empty($data['forum_id']) && isnum($data['forum_id']) ? $data['forum_id'] : 0, 'forum_type' => !empty($data['forum_type']) ? $data['forum_type'] : '');
     $_access = getusergroups();
     $access_opts['0'] = self::$locale['531'];
     while (list($key, $option) = each($_access)) {
         $access_opts[$option['0']] = $option['1'];
     }
     $public_access_opts = $access_opts;
     unset($access_opts[0]);
     // remove public away.
     $selection = array(self::$locale['forum_041'], "10 " . self::$locale['forum_points'], "20 " . self::$locale['forum_points'], "30 " . self::$locale['forum_points'], "40 " . self::$locale['forum_points'], "50 " . self::$locale['forum_points'], "60 " . self::$locale['forum_points'], "70 " . self::$locale['forum_points'], "80 " . self::$locale['forum_points'], "90 " . self::$locale['forum_points'], "100 " . self::$locale['forum_points']);
     $options = fusion_get_groups();
     unset($options[0]);
     //  no public to moderate, unset
     unset($options[-101]);
     // no member group to moderate, unset.
     add_breadcrumb(array('link' => '', 'title' => self::$locale['forum_030']));
     opentable(self::$locale['forum_030']);
     echo openform('permissionsForm', 'post', FUSION_REQUEST);
     echo "<span class='strong display-inline-block m-b-20'>" . self::$locale['forum_006'] . " : " . $data['forum_name'] . "</span>\n";
     openside();
     echo "<span class='text-dark strong display-inline-block m-b-20'>" . self::$locale['forum_desc_000'] . "</span><br/>\n";
     echo form_select('forum_access', self::$locale['forum_031'], $data['forum_access'], array('inline' => TRUE, 'options' => $public_access_opts));
     $optionArray = array("inline" => TRUE, "options" => $access_opts);
     echo form_select('forum_post', self::$locale['forum_032'], $data['forum_post'], $optionArray);
     echo form_select('forum_reply', self::$locale['forum_033'], $data['forum_reply'], $optionArray);
     echo form_select('forum_post_ratings', self::$locale['forum_039'], $data['forum_post_ratings'], $optionArray);
     closeside();
     openside();
     echo "<span class='text-dark strong display-inline-block m-b-20'>" . self::$locale['forum_desc_001'] . "</span><br/>\n";
     echo form_select('forum_poll', self::$locale['forum_036'], $data['forum_poll'], $optionArray);
     echo form_select('forum_vote', self::$locale['forum_037'], $data['forum_vote'], $optionArray);
     closeside();
     openside();
     echo "<span class='text-dark strong display-inline-block m-b-20'>" . self::$locale['forum_desc_004'] . "</span><br/>\n";
     echo form_select('forum_answer_threshold', self::$locale['forum_040'], $data['forum_answer_threshold'], array('options' => $selection, 'inline' => TRUE));
     closeside();
     openside();
     echo "<span class='text-dark strong display-inline-block m-b-20'>" . self::$locale['forum_desc_002'] . "</span><br/>\n";
     echo form_select('forum_attach', self::$locale['forum_034'], $data['forum_attach'], array('options' => $access_opts, 'inline' => TRUE));
     echo form_select('forum_attach_download', self::$locale['forum_035'], $data['forum_attach_download'], array('options' => $public_access_opts, 'inline' => TRUE));
     closeside();
     openside();
     echo form_hidden('forum_id', '', $data['forum_id']);
     echo form_select("forum_mods[]", self::$locale['forum_desc_003'], $data['forum_mods'], array("multiple" => TRUE, "width" => "100%", "options" => $options, "delimiter" => ".", "inline" => TRUE));
     /*
     echo "<span class='text-dark strong display-inline-block m-b-20'>".self::$locale['forum_desc_003']."</span><br/>\n";
     $mod_groups = getusergroups();
     $mods1_user_id = array();
     $mods1_user_name = array();
     while (list($key, $mod_group) = each($mod_groups)) {
         if ($mod_group['0'] != USER_LEVEL_PUBLIC && $mod_group['0'] != USER_LEVEL_MEMBER && $mod_group['0'] != USER_LEVEL_SUPER_ADMIN) {
             if (!preg_match("(^{$mod_group['0']}$|^{$mod_group['0']}\.|\.{$mod_group['0']}\.|\.{$mod_group['0']}$)", $data['forum_mods'])) {
                 $mods1_user_id[] = $mod_group['0'];
                 $mods1_user_name[] = $mod_group['1'];
             } else {
                 $mods2_user_id[] = $mod_group['0'];
                 $mods2_user_name[] = $mod_group['1'];
             }
         }
     }
     echo "<div class='row'>\n<div class='col-xs-12 col-sm-6 col-md-6 col-lg-6'>\n";
     echo "<select multiple='multiple' size='10' name='modlist1' id='modlist1' class='form-control textbox m-r-10' onchange=\"addUser('modlist2','modlist1');\">\n";
     for ($i = 0; $i < count($mods1_user_id); $i++) {
         echo "<option value='".$mods1_user_id[$i]."'>".$mods1_user_name[$i]."</option>\n";
     }
     echo "</select>\n";
     echo "</div>\n<div class='col-xs-12 col-sm-6 col-md-6 col-lg-6'>\n";
     echo "<select multiple='multiple' size='10' name='modlist2' id='modlist2' class='form-control textbox' onchange=\"addUser('modlist1','modlist2');\">\n";
     if (isset($mods2_user_id) && is_array($mods2_user_id)) {
         for ($i = 0; $i < count($mods2_user_id); $i++) {
             echo "<option value='".$mods2_user_id[$i]."'>".$mods2_user_name[$i]."</option>\n";
         }
     }
     echo "</select>\n";
     //echo form_text('forum_mods', '', $data['forum_mods']);
     
     echo "</div>\n</div>\n";
     */
     closeside();
     echo form_button('save_permission', self::$locale['forum_042'], self::$locale['forum_042'], array('class' => 'btn-primary'));
     /*
     add_to_jquery(" $('#save').bind('click', function() { saveMods(); }); ");
     echo "<script type='text/javascript'>\n"."function addUser(toGroup,fromGroup) {\n";
     echo "var listLength = document.getElementById(toGroup).length;\n";
     echo "var selItem = document.getElementById(fromGroup).selectedIndex;\n";
     echo "var selText = document.getElementById(fromGroup).options[selItem].text;\n";
     echo "var selValue = document.getElementById(fromGroup).options[selItem].value;\n";
     echo "var i; var newItem = true;\n";
     echo "for (i = 0; i < listLength; i++) {\n";
     echo "if (document.getElementById(toGroup).options[i].text == selText) {\n";
     echo "newItem = false; break;\n}\n}\n"."if (newItem) {\n";
     echo "document.getElementById(toGroup).options[listLength] = new Option(selText, selValue);\n";
     echo "document.getElementById(fromGroup).options[selItem] = null;\n}\n}\n";
     echo "function saveMods() {\n"."var strValues = \"\";\n";
     echo "var boxLength = document.getElementById('modlist2').length;\n";
     echo "var count = 0;\n"."	if (boxLength != 0) {\n"."for (i = 0; i < boxLength; i++) {\n";
     echo "if (count == 0) {\n"."strValues = document.getElementById('modlist2').options[i].value;\n";
     echo "} else {\n"."strValues = strValues + \".\" + document.getElementById('modlist2').options[i].value;\n";
     echo "}\n"."count++;\n}\n}\n";
     echo "if (strValues.length == 0) {\n"."document.forms['inputform'].submit();\n";
     echo "} else {\n"."document.forms['inputform'].forum_mods.value = strValues;\n";
     echo "document.forms['inputform'].submit();\n}\n}\n</script>\n";
     */
     closetable();
 }
예제 #5
0
// add features to purge all album photos and it's administration
// add features to move all album photos to another album.
echo openform('albumform', 'post', FUSION_REQUEST, array('enctype' => TRUE, 'class' => 'm-t-20'));
echo "<div class='row'>\n<div class='col-xs-12 col-sm-8'>\n";
echo form_hidden('album_id', '', $data['album_id']);
echo form_text('album_title', $locale['album_0001'], $data['album_title'], array('placeholder' => $locale['album_0002'], 'inline' => TRUE, 'required' => TRUE, "error_text" => $locale['album_0015']));
echo form_select("album_keywords", $locale['album_0005'], $data['album_keywords'], array('max_length' => 320, 'width' => '100%', 'placeholder' => $locale['album_0006'], 'tags' => TRUE, 'multiple' => TRUE, "inline" => TRUE));
echo form_textarea('album_description', $locale['album_0003'], $data['album_description'], array('placeholder' => $locale['album_0004'], 'inline' => 1));
if ($data['album_image'] || $data['album_thumb1']) {
    echo "<div class='well col-sm-offset-3'>\n";
    echo form_hidden("album_image", "", $data['album_image']);
    echo form_hidden("album_thumb2", "", $data['album_thumb2']);
    echo form_hidden("album_thumb1", "", $data['album_thumb1']);
    echo "<label for='del_image'>\n";
    echo displayAlbumImage($data['album_image'], $data['album_thumb1'], $data['album_thumb2'], "");
    echo "</label>\n";
    echo form_checkbox("del_image", $locale['album_0016'], "");
    echo "</div>\n";
} else {
    $album_upload_settings = array("upload_path" => INFUSIONS . "gallery/photos/", 'thumbnail_folder' => 'thumbs', 'thumbnail' => TRUE, 'thumbnail_w' => $gll_settings['thumb_w'], 'thumbnail_h' => $gll_settings['thumb_h'], 'thumbnail_suffix' => '_t1', 'thumbnail2' => TRUE, 'thumbnail2_w' => $gll_settings['photo_w'], 'thumbnail2_h' => $gll_settings['photo_h'], 'thumbnail2_suffix' => '_t2', 'max_width' => $gll_settings['photo_max_w'], 'max_height' => $gll_settings['photo_max_h'], 'max_byte' => $gll_settings['photo_max_b'], 'multiple' => 0, 'delete_original' => FALSE, "inline" => TRUE, "template" => "modern", "class" => "m-b-0");
    echo form_fileinput('album_image', $locale['album_0009'], "", $album_upload_settings);
    echo "<div class='m-b-10 col-xs-12 col-sm-offset-3'>" . sprintf($locale['album_0010'], parsebytesize($gll_settings['photo_max_b']), str_replace(',', ' ', ".jpg,.gif,.png"), $gll_settings['photo_max_w'], $gll_settings['photo_max_h']) . "</div>\n";
}
echo "</div>\n";
echo "<div class='col-xs-12 col-sm-4'>\n";
echo form_select('album_access', $locale['album_0007'], $data['album_access'], array('options' => fusion_get_groups(), 'inline' => TRUE));
echo form_select('album_language', $locale['album_0008'], $data['album_language'], array('options' => fusion_get_enabled_languages(), 'inline' => TRUE));
echo form_text('album_order', $locale['album_0011'], $data['album_order'], array("type" => "number", 'inline' => TRUE));
echo "</div>\n</div>\n";
echo form_button('save_album', $locale['album_0012'], $locale['album_0012'], array('class' => 'btn-success btn-sm m-r-10'));
echo closeform();
예제 #6
0
function debonair_banner_widget()
{
    global $locale;
    $acceptedMode = array("edit", "new", "del");
    echo "<a class='btn btn-default m-t-10 m-b-20' href='" . clean_request("slides=new", array(), false) . "'>" . $locale['debonair_0203'] . "</a>\n";
    echo "<div class='alert alert-info'>" . $locale['debonair_0700'] . "</div>\n";
    if (isset($_GET['slides']) && in_array($_GET['slides'], $acceptedMode)) {
        $_GET['id'] = isset($_GET['id']) && isnum($_GET['id']) ? $_GET['id'] : 0;
        $data = array();
        $db_keys = fieldgenerator(DB_DEBONAIR);
        foreach ($db_keys as $keys) {
            $value = "";
            if ($keys == "banner_id") {
                $value = 0;
            }
            if ($keys == "banner_language") {
                $value = LANGUAGE;
            }
            if ($keys == "banner_visibility") {
                $value = iGUEST;
            }
            if ($keys == "banner_datestamp") {
                $value = time();
            }
            if ($keys == "banner_order") {
                $value = dbcount("(banner_id)", DB_DEBONAIR, "banner_language='" . LANGUAGE . "'") + 1;
            }
            $data[$keys] = $value;
        }
        if ($_GET['slides'] == "edit" || $_GET['slides'] == "del") {
            $data = dbarray(dbquery("select * from " . DB_DEBONAIR . " WHERE banner_id='" . intval($_GET['id']) . "'"));
            if ($_GET['slides'] == "del" && !empty($data)) {
                // process deletion
                if ($data['banner_image']) {
                    unlink(THEME . "upload/" . $data['banner_image']);
                    unlink(THEME . "upload/" . $data['banner_thumb']);
                }
                dbquery_insert(DB_DEBONAIR, $data, "delete");
                addNotice("success", $locale['debonair_0217']);
                redirect(clean_request("", array("slides"), false));
            }
        }
        if (isset($_POST['save_slide'])) {
            $data = array("banner_id" => form_sanitizer($_POST['banner_id'], 0, "banner_id"), "banner_subject" => form_sanitizer($_POST['banner_subject'], "", "banner_subject"), "banner_description" => form_sanitizer($_POST['banner_description'], "", "banner_description"), "banner_link" => form_sanitizer($_POST['banner_link'], "", "banner_link"), "banner_language" => form_sanitizer($_POST['banner_language'], LANGUAGE, "banner_language"), "banner_visibility" => form_sanitizer($_POST['banner_visibility'], iGUEST, "banner_visibility"), "banner_datestamp" => time());
            if (defender::safe()) {
                $upload = form_sanitizer($_FILES['banner_image'], "", "banner_image");
                if (isset($upload['error']) && !$upload['error']) {
                    $data['banner_image'] = $upload['image_name'];
                    $data['banner_thumb'] = $upload['thumb1'];
                }
                if ($data['banner_id'] > 0 && dbcount("(banner_id)", DB_DEBONAIR, "banner_id='" . $data['banner_id'] . "'")) {
                    // get old data. do ordering
                    $old_data = dbquery("select banner_image, banner_thumb, banner_order from " . DB_DEBONAIR . " where banner_id='" . $data['banner_id'] . "'");
                    if ($old_data['banner_image']) {
                        unlink(THEME . "upload/" . $old_data['banner_image']);
                        unlink(THEME . "upload/" . $old_data['banner_thumb']);
                    }
                    dbquery_insert(DB_DEBONAIR, $data, "update");
                } else {
                    dbquery_insert(DB_DEBONAIR, $data, "save");
                }
                addNotice("success", $locale['debonair_0212']);
                redirect(clean_request("", array("slides"), false));
            }
        }
        echo "<h3>" . $locale['debonair_0203'] . "</h3>\n";
        echo openform("debonair_banner", "post", FUSION_REQUEST, array("enctype" => true));
        echo "<div class='row'>\n";
        echo "<div class='col-xs-12 col-sm-8'>\n";
        openside("");
        echo form_hidden("banner_id", "", $data['banner_id']);
        echo form_text("banner_subject", $locale['debonair_0205'], $data['banner_subject'], array("required" => true, "inline" => true, "placeholder" => $locale['debonair_0206']));
        echo form_textarea("banner_description", $locale['debonair_0207'], $data['banner_subject'], array("required" => true, "inline" => true, "placeholder" => $locale['debonair_0208'], "bbcode" => true));
        echo form_text("banner_link", $locale['debonair_0209'], $data['banner_subject'], array("required" => true, "inline" => true, "placeholder" => "ie. news.php?readmore=1"));
        closeside();
        openside("");
        echo form_fileinput("banner_image", $locale['debonair_0210'], $data['banner_image'] ? THEME . "upload/" . $data['banner_image'] : "", array("upload_path" => THEME . "upload/", "inline" => true, "placeholder" => $locale['debonair_0210'], "template" => "modern"));
        closeside();
        echo "</div>\n<div class='col-xs-12 col-sm-4'>\n";
        openside("");
        echo form_select("banner_language", $locale['debonair_0214'], $data['banner_language'], array("options" => fusion_get_enabled_languages(), "inline" => true, "placeholder" => $locale['debonair_0206']));
        echo form_select("banner_visibility", $locale['debonair_0215'], $data['banner_visibility'], array("options" => fusion_get_groups(), "inline" => true, "placeholder" => $locale['debonair_0206']));
        closeside();
        echo form_button("save_slide", $locale['save_changes'], "save_slide", array("class" => "btn-primary"));
        echo "<a class='btn btn-default m-l-10' href='" . clean_request("", array("slides"), false) . "'>" . $locale['cancel'] . "</a>\n";
        echo "</div>\n</div>\n";
        echo closeform();
    } else {
        if (isset($_GET['move']) && isset($_GET['id']) && isnum($_GET['id'])) {
            $data = dbarray(dbquery("select banner_id, banner_order FROM " . DB_DEBONAIR . " where banner_id='" . intval($_GET['id']) . "' AND banner_language='" . LANGUAGE . "'"));
            if ($_GET['move'] == "md") {
                dbquery("UPDATE " . DB_DEBONAIR . " SET banner_order=banner_order-1 WHERE banner_order= '" . ($data['banner_order'] + 1) . "' AND banner_language='" . LANGUAGE . "'");
                dbquery("UPDATE " . DB_DEBONAIR . " SET banner_order=banner_order+1 WHERE banner_id='" . $data['banner_id'] . "' AND banner_language='" . LANGUAGE . "'");
            }
            if ($_GET['move'] == "mup") {
                dbquery("UPDATE " . DB_DEBONAIR . " SET banner_order=banner_order+1 WHERE banner_order= '" . ($data['banner_order'] - 1) . "' AND banner_language='" . LANGUAGE . "'");
                dbquery("UPDATE " . DB_DEBONAIR . " SET banner_order=banner_order-1 WHERE banner_id='" . $data['banner_id'] . "' AND banner_language='" . LANGUAGE . "'");
            }
            addNotice("success", $locale['debonair_0220']);
            redirect(clean_request("", array("move", "id"), false));
        }
        $result = dbquery("SELECT * FROM " . DB_DEBONAIR . " WHERE banner_language='" . LANGUAGE . "' order by banner_order ASC");
        if (dbrows($result) > 0) {
            echo "<table class='table table-striped'>\n";
            echo "<tr>\n\n\t\t<th>" . $locale['debonair_0205'] . "</th>\n\t\t<th>" . $locale['debonair_0210'] . "</th>\n\t\t<th>" . $locale['debonair_0214'] . "</th>\n<th>" . $locale['debonair_0215'] . "</th>\n\t\t<th>" . $locale['debonair_0211'] . "</th>\n\t\t<th>" . $locale['debonair_0216'] . "</th></tr>";
            while ($data = dbarray($result)) {
                echo "\n\t\t\t<tr>\n\n\t\t\t<td><a href='" . clean_request("slides=edit&id=" . $data['banner_id'], array(), false) . "'>" . $data['banner_subject'] . "</a></td>\n\n\t\t\t<td>" . ($data['banner_image'] ? $locale['yes'] : $locale['no']) . "</td>\n\n\t\t\t<td>" . $data['banner_language'] . "</td>\n\n\t\t\t<td>" . getgroupname($data['banner_visibility']) . "</td>\n";
                echo "<td>\n";
                if ($data['banner_order'] == 1) {
                    echo "<a href='" . clean_request("move=md&id=" . $data['banner_id'], array(), false) . "'>" . $locale['debonair_0219'] . "</a>";
                } elseif ($data['banner_order'] == dbrows($result)) {
                    echo "<a href='" . clean_request("move=mup&id=" . $data['banner_id'], array(), false) . "'>" . $locale['debonair_0218'] . "</a>";
                } else {
                    echo "<a href='" . clean_request("move=mup&id=" . $data['banner_id'], array(), false) . "'>" . $locale['debonair_0218'] . "</a> - ";
                    echo "<a href='" . clean_request("move=md&id=" . $data['banner_id'], array(), false) . "'>" . $locale['debonair_0219'] . "</a>";
                }
                echo "</td>\n\n\t\t\t<td>\n\t\t\t<a href='" . clean_request("slides=edit&id=" . $data['banner_id'], array(), false) . "'>" . $locale['edit'] . "</a>\n\t\t\t- <a href='" . clean_request("slides=del&id=" . $data['banner_id'], array(), false) . "'>" . $locale['delete'] . "</a>\n\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t";
            }
            echo "</table>\n";
        } else {
            echo "<div class='well text-center'>" . $locale['debonair_0213'] . "</div>\n";
        }
    }
}
예제 #7
0
 echo "</div>\n";
 // end package
 openside();
 if (fusion_get_settings('comments_enabled') == "0" || fusion_get_settings('ratings_enabled') == "0") {
     $sys = "";
     if (fusion_get_settings('comments_enabled') == "0" && fusion_get_settings('ratings_enabled') == "0") {
         $sys = $locale['comments_ratings'];
     } elseif (fusion_get_settings('comments_enabled') == "0") {
         $sys = $locale['comments'];
     } else {
         $sys = $locale['ratings'];
     }
     echo "<div class='well'>" . sprintf($locale['download_0256'], $sys) . "</div>\n";
 }
 echo form_select_tree("download_cat", $locale['download_0207'], $callback_data['download_cat'], array("no_root" => 1, "placeholder" => $locale['choose'], 'width' => '100%', "query" => multilang_table("DL") ? "WHERE download_cat_language='" . LANGUAGE . "'" : ""), DB_DOWNLOAD_CATS, "download_cat_name", "download_cat_id", "download_cat_parent");
 echo form_select('download_visibility', $locale['download_0205'], $callback_data['download_visibility'], array('options' => fusion_get_groups(), 'placeholder' => $locale['choose'], 'width' => '100%'));
 echo form_button('publish', $locale['download_0061'], $locale['download_0061'], array('class' => 'btn-primary m-r-10'));
 closeside();
 openside('');
 echo form_checkbox('download_allow_comments', $locale['download_0223'], $callback_data['download_allow_comments'], array('class' => 'm-b-0'));
 echo form_checkbox('download_allow_ratings', $locale['download_0224'], $callback_data['download_allow_ratings'], array('class' => 'm-b-0'));
 if (isset($_GET['action']) && $_GET['action'] == "edit") {
     echo form_checkbox('update_datestamp', $locale['download_0213'], '', array('class' => 'm-b-0'));
 }
 closeside();
 openside();
 echo form_text('download_license', $locale['download_0208'], $callback_data['download_license'], array('inline' => 1));
 echo form_text('download_copyright', $locale['download_0222'], $callback_data['download_copyright'], array('inline' => 1));
 echo form_text('download_os', $locale['download_0209'], $callback_data['download_os'], array('inline' => 1));
 echo form_text('download_version', $locale['download_0210'], $callback_data['download_version'], array('inline' => 1));
 echo form_text('download_homepage', $locale['download_0221'], $callback_data['download_homepage'], array('inline' => 1));
예제 #8
0
        if (dbrows($result)) {
            $data = dbarray($result);
        } else {
            redirect(FUSION_SELF . $aidlink);
        }
    }
    echo openform('inputform', 'post', FUSION_REQUEST, array("class" => "m-t-20"));
    echo "<div class='row'>\n";
    echo "<div class='col-xs-12 col-sm-8'>\n";
    echo form_hidden("weblink_datestamp", "", $data['weblink_datestamp']);
    echo form_hidden("weblink_id", "", $data['weblink_id']);
    echo form_text('weblink_name', $locale['wl_0100'], $data['weblink_name'], array("placeholder" => $locale['wl_0101'], "error_text" => $locale['wl_0102'], "inline" => TRUE, 'required' => TRUE));
    echo form_text('weblink_url', $locale['wl_0104'], $data['weblink_url'], array("type" => "url", "placeholder" => "http://", "required" => TRUE, "inline" => TRUE));
    echo form_textarea('weblink_description', $locale['wl_0103'], $data['weblink_description'], array("inline" => TRUE, "html" => fusion_get_settings("tinymce_enabled") ? FALSE : TRUE, "preview" => fusion_get_settings("tinymce_enabled") ? FALSE : TRUE, "autosize" => fusion_get_settings("tinymce_enabled") ? FALSE : TRUE, "form_name" => "inputform"));
    echo "</div>\n";
    echo "<div class='col-xs-12 col-sm-4'>\n";
    if ($weblink_edit) {
        echo form_checkbox("update_datestamp", $locale['wl_0107'], "");
    }
    openside("");
    echo form_select_tree("weblink_cat", $locale['wl_0105'], $data['weblink_cat'], array("inline" => TRUE, "no_root" => 1, "placeholder" => $locale['choose'], "query" => multilang_table("WL") ? "WHERE weblink_cat_language='" . LANGUAGE . "'" : ""), DB_WEBLINK_CATS, "weblink_cat_name", "weblink_cat_id", "weblink_cat_parent");
    echo form_select('weblink_visibility', $locale['wl_0106'], $data['weblink_visibility'], array("inline" => TRUE, 'options' => fusion_get_groups()));
    echo form_button('save_link', $locale['wl_0108'], $locale['wl_0108'], array("input_id" => "savelink2", 'class' => 'btn-primary m-t-10'));
    closeside();
    echo "</div>\n</div>\n";
    echo form_button('save_link', $locale['wl_0108'], $locale['wl_0108'], array('class' => 'btn-primary m-t-10'));
    echo closeform();
} else {
    echo "<div class='text-center'>\n" . $locale['537'] . "<br />\n" . $locale['538'] . "<br />\n<br />\n";
    echo "<a href='" . INFUSIONS . "weblinks/weblinks_admin.php" . $aidlink . "&amp;section=weblinks_category'>" . $locale['539'] . "</a>" . $locale['540'] . "</div>\n";
}
예제 #9
0
/**
 * Displays News Form
 */
function display_news_form()
{
    global $aidlink;
    if (isset($_POST['cancel'])) {
        redirect(FUSION_SELF . $aidlink);
    }
    $formaction = FUSION_REQUEST;
    $locale = fusion_get_locale();
    $userdata = fusion_get_userdata();
    $news_settings = fusion_get_settings("news");
    $edit = isset($_GET['action']) && $_GET['action'] == 'edit' && isset($_GET['news_id']) && isnum($_GET['news_id']) ? TRUE : FALSE;
    add_breadcrumb(array('link' => '', 'title' => $edit ? $locale['news_0003'] : $locale['news_0002']));
    $data = array('news_id' => 0, 'news_draft' => 0, 'news_sticky' => 0, 'news_news' => '', 'news_datestamp' => time(), 'news_extended' => '', 'news_keywords' => '', 'news_breaks' => 'n', 'news_allow_comments' => 1, 'news_allow_ratings' => 1, 'news_language' => LANGUAGE, 'news_visibility' => 0, 'news_subject' => '', 'news_start' => '', 'news_end' => '', 'news_cat' => 0, 'news_image' => '', 'news_ialign' => 'pull-left');
    if (fusion_get_settings("tinymce_enabled")) {
        $data['news_breaks'] = 'n';
    } else {
        $data['news_breaks'] = 'y';
    }
    if (isset($_POST['save']) or isset($_POST['save_and_close'])) {
        $news_news = "";
        if ($_POST['news_news']) {
            $news_news = str_replace("src='" . str_replace("../", "", IMAGES_N), "src='" . IMAGES_N, fusion_get_settings('allow_php_exe') ? htmlspecialchars($_POST['news_news']) : stripslashes($_POST['news_news']));
            $news_news = parse_textarea($news_news);
        }
        $news_extended = "";
        if ($_POST['news_extended']) {
            $news_extended = str_replace("src='" . str_replace("../", "", IMAGES_N), "src='" . IMAGES_N, fusion_get_settings('allow_php_exe') ? htmlspecialchars($_POST['news_extended']) : stripslashes($_POST['news_extended']));
            $news_extended = parse_textarea($news_extended);
        }
        $data = array('news_id' => form_sanitizer($_POST['news_id'], 0, 'news_id'), 'news_subject' => form_sanitizer($_POST['news_subject'], '', 'news_subject'), 'news_cat' => form_sanitizer($_POST['news_cat'], 0, 'news_cat'), 'news_news' => form_sanitizer($news_news, "", "news_news"), 'news_extended' => form_sanitizer($news_extended, "", "news_extended"), 'news_keywords' => form_sanitizer($_POST['news_keywords'], '', 'news_keywords'), 'news_datestamp' => form_sanitizer($_POST['news_datestamp'], '', 'news_datestamp'), 'news_start' => form_sanitizer($_POST['news_start'], 0, 'news_start'), 'news_end' => form_sanitizer($_POST['news_end'], 0, 'news_end'), 'news_visibility' => form_sanitizer($_POST['news_visibility'], 0, 'news_visibility'), 'news_draft' => isset($_POST['news_draft']) ? "1" : "0", 'news_sticky' => isset($_POST['news_sticky']) ? "1" : "0", 'news_allow_comments' => isset($_POST['news_allow_comments']) ? "1" : "0", 'news_allow_ratings' => isset($_POST['news_allow_ratings']) ? "1" : "0", 'news_language' => form_sanitizer($_POST['news_language'], '', 'news_language'), 'news_image' => "", 'news_ialign' => "", 'news_image_t1' => "", 'news_image_t2' => "");
        if (isset($_FILES['news_image'])) {
            // when files is uploaded.
            $upload = form_sanitizer($_FILES['news_image'], '', 'news_image');
            if (!empty($upload) && !$upload['error']) {
                $data['news_image'] = $upload['image_name'];
                $data['news_image_t1'] = $upload['thumb1_name'];
                $data['news_image_t2'] = $upload['thumb2_name'];
                $data['news_ialign'] = isset($_POST['news_ialign']) ? form_sanitizer($_POST['news_ialign'], "pull-left", "news_ialign") : "pull-left";
            }
        } else {
            // when files not uploaded. but there should be exist check.
            $data['news_image'] = isset($_POST['news_image']) ? $_POST['news_image'] : "";
            $data['news_image_t1'] = isset($_POST['news_image_t1']) ? $_POST['news_image_t1'] : "";
            $data['news_image_t2'] = isset($_POST['news_image_t2']) ? $_POST['news_image_t2'] : "";
            $data['news_ialign'] = isset($_POST['news_ialign']) ? form_sanitizer($_POST['news_ialign'], "pull-left", "news_ialign") : "pull-left";
        }
        if (fusion_get_settings('tinymce_enabled') != 1) {
            $data['news_breaks'] = isset($_POST['line_breaks']) ? "y" : "n";
        } else {
            $data['news_breaks'] = "n";
        }
        if ($data['news_sticky'] == "1") {
            $result = dbquery("UPDATE " . DB_NEWS . " SET news_sticky='0' WHERE news_sticky='1'");
        }
        // reset other sticky
        // delete image
        if (isset($_POST['del_image'])) {
            if (!empty($data['news_image']) && file_exists(IMAGES_N . $data['news_image'])) {
                unlink(IMAGES_N . $data['news_image']);
            }
            if (!empty($data['news_image_t1']) && file_exists(IMAGES_N_T . $data['news_image_t1'])) {
                unlink(IMAGES_N_T . $data['news_image_t1']);
            }
            if (!empty($data['news_image_t2']) && file_exists(IMAGES_N_T . $data['news_image_t2'])) {
                unlink(IMAGES_N_T . $data['news_image_t2']);
            }
            $data['news_image'] = "";
            $data['news_image_t1'] = "";
            $data['news_image_t2'] = "";
        }
        if (defender::safe()) {
            if (dbcount("('news_id')", DB_NEWS, "news_id='" . $data['news_id'] . "'")) {
                dbquery_insert(DB_NEWS, $data, 'update');
                addNotice('success', $locale['news_0101']);
            } else {
                $data['news_name'] = $userdata['user_id'];
                dbquery_insert(DB_NEWS, $data, 'save');
                addNotice('success', $locale['news_0100']);
            }
            if (isset($_POST['save_and_close'])) {
                redirect(clean_request("", array("ref"), FALSE));
            } else {
                redirect(FUSION_REQUEST);
            }
        }
    } elseif (isset($_GET['action']) && $_GET['action'] == "edit" && (isset($_POST['news_id']) && isnum($_POST['news_id'])) || isset($_GET['news_id']) && isnum($_GET['news_id'])) {
        $result = dbquery("SELECT * FROM " . DB_NEWS . " WHERE news_id='" . (isset($_POST['news_id']) ? $_POST['news_id'] : $_GET['news_id']) . "'");
        if (dbrows($result)) {
            $data = dbarray($result);
        } else {
            redirect(FUSION_SELF . $aidlink);
        }
    }
    $result = dbquery("SELECT news_cat_id, news_cat_name FROM " . DB_NEWS_CATS . " " . (multilang_table("NS") ? "WHERE news_cat_language='" . LANGUAGE . "'" : "") . " ORDER BY news_cat_name");
    $news_cat_opts = array();
    $news_cat_opts['0'] = $locale['news_0202'];
    if (dbrows($result)) {
        while ($odata = dbarray($result)) {
            $news_cat_opts[$odata['news_cat_id']] = $odata['news_cat_name'];
        }
    }
    echo "<div class='m-t-20'>\n";
    $news_settings = get_settings("news");
    echo openform('news_form', 'post', $formaction, array('enctype' => 1));
    echo "<div class='row'>\n";
    echo "<div class='col-xs-12 col-sm-12 col-md-7 col-lg-8'>\n";
    echo form_hidden('news_id', "", $data['news_id']);
    echo form_text('news_subject', $locale['news_0200'], $data['news_subject'], array('required' => 1, 'max_length' => 200, 'error_text' => $locale['news_0250']));
    echo form_select('news_keywords', $locale['news_0205'], $data['news_keywords'], array("max_length" => 320, "placeholder" => $locale['news_0205a'], "width" => "100%", "error_text" => $locale['news_0255'], "tags" => TRUE, "multiple" => TRUE));
    echo "<div class='pull-left m-r-10 display-inline-block'>\n";
    echo form_datepicker('news_start', $locale['news_0206'], $data['news_start'], array('placeholder' => $locale['news_0208'], "join_to_id" => "news_end"));
    echo "</div>\n<div class='pull-left m-r-10 display-inline-block'>\n";
    echo form_datepicker('news_end', $locale['news_0207'], $data['news_end'], array('placeholder' => $locale['news_0208'], "join_from_id" => "news_start"));
    echo "</div>\n";
    echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-5 col-lg-4'>\n";
    openside('');
    echo form_select_tree("news_cat", $locale['news_0201'], $data['news_cat'], array("width" => "100%", "inline" => TRUE, "parent_value" => $locale['news_0202'], "query" => multilang_table("NS") ? "WHERE news_cat_language='" . LANGUAGE . "'" : ""), DB_NEWS_CATS, "news_cat_name", "news_cat_id", "news_cat_parent");
    echo form_select('news_visibility', $locale['news_0209'], $data['news_visibility'], array('options' => fusion_get_groups(), 'placeholder' => $locale['choose'], 'width' => '100%', "inline" => TRUE));
    if (multilang_table("NS")) {
        echo form_select('news_language', $locale['global_ML100'], $data['news_language'], array('options' => fusion_get_enabled_languages(), 'placeholder' => $locale['choose'], 'width' => '100%', "inline" => TRUE));
    } else {
        echo form_hidden('news_language', '', $data['news_language']);
    }
    echo form_button('cancel', $locale['cancel'], $locale['cancel'], array('class' => 'btn-default m-r-10'));
    echo form_button('save', $locale['news_0241'], $locale['news_0241'], array('class' => 'btn-success'));
    echo form_button("save_and_close", "Save and Close", "save_and_close", array("class" => "btn-primary m-l-10"));
    closeside();
    echo "</div>\n</div>\n";
    $snippetSettings = array("required" => TRUE, "preview" => TRUE, "html" => TRUE, "autosize" => TRUE, "placeholder" => $locale['news_0203a'], "form_name" => "news_form");
    if (fusion_get_settings("tinymce_enabled")) {
        $snippetSettings = array("required" => TRUE, "type" => "tinymce", "tinymce" => "advanced");
    }
    echo form_textarea('news_news', $locale['news_0203'], $data['news_news'], $snippetSettings);
    if (!fusion_get_settings("tinymce_enabled")) {
        $extendedSettings = array("preview" => TRUE, "html" => TRUE, "autosize" => TRUE, "placeholder" => $locale['news_0203b'], "form_name" => "news_form");
    } else {
        $extendedSettings = array("type" => "tinymce", "tinymce" => "advanced");
    }
    echo form_textarea('news_extended', $locale['news_0204'], $data['news_extended'], $extendedSettings);
    // second row
    echo "<div class='row'>\n";
    echo "<div class='col-xs-12 col-sm-12 col-md-7 col-lg-8'>\n";
    openside('');
    if ($data['news_image'] != "" && $data['news_image_t1'] != "") {
        $image_thumb = get_news_image_path($data['news_image'], $data['news_image_t1'], $data['news_image_t2']);
        if (!$image_thumb) {
            $image_thumb = IMAGES . "imagenotfound70.jpg";
        }
        echo "<div class='row'>\n";
        echo "<div class='col-xs-12 col-sm-6'>\n";
        echo "<label><img class='img-responsive img-thumbnail' src='" . $image_thumb . "' alt='" . $locale['news_0216'] . "' /><br />\n";
        echo "<input type='checkbox' name='del_image' value='y' /> " . $locale['delete'] . "</label>\n";
        echo "</div>\n";
        echo "<div class='col-xs-12 col-sm-6'>\n";
        $alignOptions = array('pull-left' => $locale['left'], 'news-img-center' => $locale['center'], 'pull-right' => $locale['right']);
        echo form_select('news_ialign', $locale['news_0218'], $data['news_ialign'], array("options" => $alignOptions, "inline" => FALSE));
        echo "</div>\n</div>\n";
        echo "<input type='hidden' name='news_image' value='" . $data['news_image'] . "' />\n";
        echo "<input type='hidden' name='news_image_t1' value='" . $data['news_image_t1'] . "' />\n";
        echo "<input type='hidden' name='news_image_t2' value='" . $data['news_image_t2'] . "' />\n";
    } else {
        $file_input_options = array('upload_path' => IMAGES_N, 'max_width' => $news_settings['news_photo_max_w'], 'max_height' => $news_settings['news_photo_max_h'], 'max_byte' => $news_settings['news_photo_max_b'], 'thumbnail' => 1, 'thumbnail_w' => $news_settings['news_thumb_w'], 'thumbnail_h' => $news_settings['news_thumb_h'], 'thumbnail_folder' => 'thumbs', 'delete_original' => 0, 'thumbnail2' => 1, 'thumbnail2_w' => $news_settings['news_photo_w'], 'thumbnail2_h' => $news_settings['news_photo_h'], 'type' => 'image');
        echo form_fileinput("news_image", $locale['news_0216'], "", $file_input_options);
        echo "<div class='small m-b-10'>" . sprintf($locale['news_0217'], parsebytesize($news_settings['news_photo_max_b'])) . "</div>\n";
        $alignOptions = array('pull-left' => $locale['left'], 'news-img-center' => $locale['center'], 'pull-right' => $locale['right']);
        echo form_select('news_ialign', $locale['news_0218'], $data['news_ialign'], array("options" => $alignOptions));
    }
    closeside();
    openside('');
    echo "<label><input type='checkbox' name='news_draft' value='yes'" . ($data['news_draft'] ? "checked='checked'" : "") . " /> " . $locale['news_0210'] . "</label><br />\n";
    echo "<label><input type='checkbox' name='news_sticky' value='yes'" . ($data['news_sticky'] ? "checked='checked'" : "") . "  /> " . $locale['news_0211'] . "</label><br />\n";
    echo form_hidden('news_datestamp', '', $data['news_datestamp']);
    if (fusion_get_settings("tinymce_enabled") != 1) {
        echo "<label><input type='checkbox' name='line_breaks' value='yes'" . ($data['news_breaks'] ? "checked='checked'" : "") . " /> " . $locale['news_0212'] . "</label><br />\n";
    }
    closeside();
    echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-5 col-lg-4'>\n";
    openside("");
    if (!fusion_get_settings("comments_enabled") || !fusion_get_settings("ratings_enabled")) {
        $sys = "";
        if (!fusion_get_settings("comments_enabled") && !fusion_get_settings("ratings_enabled")) {
            $sys = $locale['comments_ratings'];
        } elseif (!fusion_get_settings("comments_enabled")) {
            $sys = $locale['comments'];
        } else {
            $sys = $locale['ratings'];
        }
        echo "<div class='alert alert-warning'>" . sprintf($locale['news_0253'], $sys) . "</div>\n";
    }
    echo "<label><input type='checkbox' name='news_allow_comments' value='yes' onclick='SetRatings();'" . ($data['news_allow_comments'] ? "checked='checked'" : "") . " /> " . $locale['news_0213'] . "</label><br/>";
    echo "<label><input type='checkbox' name='news_allow_ratings' value='yes'" . ($data['news_allow_ratings'] ? "checked='checked'" : "") . " /> " . $locale['news_0214'] . "</label>";
    closeside();
    echo "</div>\n</div>\n";
    echo form_button('preview', $locale['news_0240'], $locale['news_0240'], array('class' => 'btn-default m-r-10'));
    echo form_button('save', $locale['news_0241'], $locale['news_0241'], array('class' => 'btn-success'));
    echo form_button("save_and_close", "Save and Close", "save_and_close", array("class" => "btn-primary m-l-10"));
    echo closeform();
    echo "</div>\n";
}
예제 #10
0
echo form_text("article_subject", $locale['articles_0200'], $data['article_subject'], array('required' => TRUE));
echo form_select("article_keywords", $locale['articles_0204'], $data['article_keywords'], array('max_length' => 320, 'width' => '100%', 'error_text' => $locale['articles_0257'], 'tags' => TRUE, 'multiple' => TRUE));
$textArea_opts = array("required" => TRUE, "type" => fusion_get_settings("tinymce_enabled") ? "tinymce" : "html", "tinymce" => fusion_get_settings("tinymce_enabled") && iADMIN ? "advanced" : "simple", "autosize" => TRUE, "form_name" => "input_form");
echo form_textarea('article_snippet', $locale['articles_0202'], $data['article_snippet'], $textArea_opts);
$textArea_opts['required'] = FALSE;
echo form_textarea("article_article", $locale['articles_0203'], $data['article_article'], $textArea_opts);
echo "</div>\n";
echo "<div class='col-xs-12 col-sm-12 col-md-12 col-lg-4'>\n";
openside("");
echo form_select_tree("article_cat", $locale['articles_0201'], $data['article_cat'], array("no_root" => TRUE, "query" => multilang_table("AR") ? "WHERE article_cat_language='" . LANGUAGE . "'" : ""), DB_ARTICLE_CATS, "article_cat_name", "article_cat_id", "article_cat_parent");
if (multilang_table("AR")) {
    echo form_select('article_language', $locale['global_ML100'], $data['article_language'], array('options' => fusion_get_enabled_languages(), 'placeholder' => $locale['choose'], "inline" => false));
} else {
    echo form_hidden('article_language', '', $data['article_language']);
}
echo form_select('article_visibility', $locale['articles_0211'], $data['article_visibility'], array('options' => fusion_get_groups(), 'placeholder' => $locale['choose']));
closeside();
openside("");
echo "<label><input type='checkbox' name='article_draft' value='yes' " . ($data['article_draft'] ? "checked='checked'" : "") . " /> " . $locale['articles_0205'] . "</label><br />\n";
if (fusion_get_settings("tinymce_enabled") == FALSE) {
    echo "<label><input type='checkbox' name='article_breaks' value='yes' " . ($data['article_breaks'] ? "checked='checked'" : "") . "  /> " . $locale['articles_0206'] . "</label><br />\n";
}
closeside();
openside("");
if (!fusion_get_settings("comments_enabled") || !fusion_get_settings("ratings_enabled")) {
    $sys = "";
    if (!fusion_get_settings("comments_enabled") || !fusion_get_settings("ratings_enabled")) {
        $sys = $locale['comments_ratings'];
    } elseif (!fusion_get_settings("comments_enabled")) {
        $sys = $locale['comments'];
    } else {
예제 #11
0
 /**
  * The HTML form
  * @param $data
  */
 public static function customPage_form($data)
 {
     global $aidlink, $locale;
     if (isset($_POST['preview'])) {
         if (\defender::safe()) {
             echo openmodal("cp_preview", $locale['429']);
             echo "<h3>" . $data['page_title'] . "</h3>\n";
             if (fusion_get_settings("allow_php_exe")) {
                 ob_start();
                 eval("?>" . stripslashes($_POST['page_content']) . "<?php ");
                 $eval = ob_get_contents();
                 ob_end_clean();
                 echo $eval;
             } else {
                 echo "<p>" . nl2br(parse_textarea($_POST['page_content'])) . "</p>\n";
             }
             echo closemodal();
         }
         $data = array('page_id' => form_sanitizer($_POST['page_id'], 0, 'page_id'), 'link_id' => form_sanitizer($_POST['link_id'], 0, 'link_id'), 'link_order' => form_sanitizer($_POST['link_order'], 0, 'link_order'), 'page_link_cat' => form_sanitizer($_POST['page_link_cat'], 0, 'page_link_cat'), 'page_title' => form_sanitizer($_POST['page_title'], '', 'page_title'), 'page_access' => form_sanitizer($_POST['page_access'], 0, 'page_access'), 'page_content' => form_sanitizer($_POST['page_content'], "", "page_content"), 'page_keywords' => form_sanitizer($_POST['page_keywords'], '', 'page_keywords'), 'page_language' => implode('.', isset($_POST['page_language']) ? sanitize_array($_POST['page_language']) : array()), 'page_allow_comments' => isset($_POST['page_allow_comments']) ? 1 : 0, 'page_allow_ratings' => isset($_POST['page_allow_ratings']) ? 1 : 0);
     }
     echo openform('inputform', 'post', FUSION_REQUEST, array("class" => "m-t-20"));
     if (isset($_POST['edit']) && isset($_POST['page_id'])) {
         echo form_hidden('edit', '', 'edit');
     }
     echo "<div class='row m-t-20' >\n";
     echo "<div class='col-xs-12 col-sm-8'>\n";
     echo form_text('page_title', $locale['422'], $data['page_title'], array('required' => 1));
     echo form_select('page_keywords', $locale['432'], $data['page_keywords'], array('max_length' => 320, 'width' => '100%', 'tags' => 1, 'multiple' => 1));
     $textArea_config = array('width' => '100%', 'height' => '260px', 'form_name' => 'inputform', 'type' => "html", 'class' => 'm-t-20');
     if (isset($_COOKIE['custom_pages_tinymce']) && $_COOKIE['custom_pages_tinymce'] == 1 && fusion_get_settings('tinymce_enabled')) {
         $textArea_config = array("type" => "tinymce", "tinymce" => "advanced", "class" => "m-t-20");
     }
     echo form_textarea('page_content', '', $data['page_content'], $textArea_config);
     echo "</div>\n";
     echo "<div class='col-xs-12 col-sm-4'>\n";
     openside("");
     echo form_button('save', $locale['430'], $locale['430'], array('class' => 'btn-primary m-r-10 m-t-10'));
     echo form_button('preview', $locale['429'], $locale['429'], array('class' => 'btn-default m-r-10 m-t-10'));
     closeside();
     if (fusion_get_settings('tinymce_enabled')) {
         openside('');
         $val = !isset($_COOKIE['custom_pages_tinymce']) || $_COOKIE['custom_pages_tinymce'] == 0 ? $locale['461'] . " TINYMCE" : $locale['462'] . " TINYMCE";
         echo form_button('tinymce_switch', $val, $val, array('class' => 'btn-default btn-block', 'type' => 'button'));
         add_to_jquery("\n\t\t\t\$('#tinymce_switch').bind('click', function() {\n\t\t\t\tSetTinyMCE(" . (!isset($_COOKIE['custom_pages_tinymce']) || $_COOKIE['custom_pages_tinymce'] == 0 ? 1 : 0) . ");\n\t\t\t});\n\t\t\t");
         closeside();
     }
     if (fusion_get_settings('comments_enabled') == "0" || fusion_get_settings('ratings_enabled') == "0") {
         echo "<div class='tbl2 well'>\n";
         if (fusion_get_settings('comments_enabled') == "0" && fusion_get_settings('ratings_enabled') == "0") {
             $sys = $locale['457'];
         } elseif (fusion_get_settings('comments_enabled') == "0") {
             $sys = $locale['455'];
         } else {
             $sys = $locale['456'];
         }
         echo sprintf($locale['454'], $sys);
         echo "</div>\n";
     }
     if (!$data['page_id']) {
         openside("");
         echo form_checkbox('add_link', $locale['426'], 1);
         echo "<div id='link_add_sel' style='display:none;'>\n";
         echo form_select_tree("page_link_cat", $locale['SL_0029'], $data['page_link_cat'], array("parent_value" => $locale['parent'], 'width' => '100%', 'query' => (multilang_table("SL") ? "WHERE link_language='" . LANGUAGE . "' AND" : '') . " link_position >= 2", 'disable_opts' => $data['link_id'], 'hide_disabled' => 1), DB_SITE_LINKS, "link_name", "link_id", "link_cat");
         echo "</div>\n";
         add_to_jquery("\n            var checked = \$('#add_link').is(':checked');\n            if (checked) {\n                \$('#link_add_sel').show();\n            } else {\n                \$('#link_add_sel').hide();\n            }\n            \$('#add_link').bind('click', function(e) {\n                var checked = \$(this).is(':checked');\n                if (checked) {\n                    \$('#link_add_sel').show();\n                } else {\n                    \$('#link_add_sel').hide();\n                }\n            });\n            ");
         closeside();
     }
     openside("");
     echo form_checkbox('page_allow_comments', $locale['427'], $data['page_allow_comments'], array('class' => 'm-b-0'));
     echo form_checkbox('page_allow_ratings', $locale['428'], $data['page_allow_ratings'], array('class' => 'm-b-0'));
     echo form_hidden('link_id', '', $data['link_id']);
     echo form_hidden('link_order', '', $data['link_order']);
     closeside();
     openside();
     if (multilang_table("CP")) {
         $page_lang = !empty($data['page_language']) ? explode('.', $data['page_language']) : array();
         foreach (fusion_get_enabled_languages() as $language => $language_name) {
             $isDisabled = LANGUAGE == $language ? TRUE : FALSE;
             echo form_checkbox('page_language[]', $language_name, in_array($language, $page_lang) ? TRUE : FALSE, array('class' => 'm-b-0', 'value' => $language, 'input_id' => 'page_lang-' . $language, "disabled" => $isDisabled ? TRUE : FALSE, "delimiter" => "."));
             if ($isDisabled) {
                 echo form_hidden("page_language[]", "", $language);
             }
         }
     } else {
         echo form_hidden('page_language', '', $data['page_language']);
     }
     closeside();
     openside();
     echo form_select('page_access', $locale['423'], $data['page_access'], array('options' => fusion_get_groups(), 'width' => '100%'));
     closeside();
     echo "</div></div>\n";
     echo form_hidden('page_id', '', $data['page_id']);
     echo form_button('save', $locale['430'], $locale['430'], array('class' => 'btn-primary m-r-10'));
     if (isset($_POST['edit'])) {
         echo form_button('cancel', $locale['cancel'], $locale['cancel'], array('class' => 'btn-default m-r-10'));
     }
     echo closeform();
     closetable();
     add_to_jquery("\n\t\t\t\$('#delete').bind('click', function() { confirm('" . $locale['450'] . "'); });\n\t\t\t\$('#save').bind('click', function() {\n\t\t\tvar page_title = \$('#page_title').val();\n\t\t\tif (page_title =='') { alert('" . $locale['451'] . "'); return false; }\n\t\t\t});\n\t\t");
     if (fusion_get_settings('tinymce_enabled')) {
         add_to_jquery("\n\t\t\tfunction SetTinyMCE(val) {\n\t\t\tnow=new Date();\n" . "now.setTime(now.getTime()+1000*60*60*24*365);\n\t\t\texpire=(now.toGMTString());\n" . "document.cookie=\"custom_pages_tinymce=\"+escape(val)+\";expires=\"+expire;\n\t\t\tlocation.href='" . FUSION_SELF . $aidlink . "&section=cp2';\n\t\t\t}\n\t\t    ");
     }
 }
예제 #12
0
/**
 * Displays News Category Listing
 */
function display_news_cat_listing()
{
    global $aidlink;
    $locale = fusion_get_locale();
    // need to paginate
    $_GET['rowstart'] = isset($_GET['rowstart']) && isnum($_GET['rowstart']) && $_GET['rowstart'] <= dbcount("(news_cat_id)", DB_NEWS_CATS, "") ? intval($_GET['rowstart']) : 0;
    // Run functions
    $allowed_actions = array_flip(array("publish", "unpublish", "sticky", "unsticky", "delete"));
    if (isset($_POST['table_action']) && isset($allowed_actions[$_POST['table_action']])) {
        $input = explode(",", form_sanitizer($_POST['news_cat_id'], "", "news_cat_id"));
        if (!empty($input)) {
            foreach ($input as $news_cat_id) {
                // check input table
                if (dbcount("('news_cat_id')", DB_NEWS_CATS, "news_cat_id='" . intval($news_cat_id) . "'") && defender::safe()) {
                    switch ($_POST['table_action']) {
                        case "publish":
                            dbquery("UPDATE " . DB_NEWS_CATS . " SET news_cat_draft='0' WHERE news_cat_id='" . intval($news_cat_id) . "'");
                            break;
                        case "unpublish":
                            dbquery("UPDATE " . DB_NEWS_CATS . " SET news_cat_draft='1' WHERE news_cat_id='" . intval($news_cat_id) . "'");
                            break;
                        case "sticky":
                            dbquery("UPDATE " . DB_NEWS_CATS . " SET news_cat_sticky='1' WHERE news_cat_id='" . intval($news_cat_id) . "'");
                            break;
                        case "unsticky":
                            dbquery("UPDATE " . DB_NEWS_CATS . " SET news_cat_sticky='0' WHERE news_cat_id='" . intval($news_cat_id) . "'");
                            break;
                        case "delete":
                            if (!dbcount("('news_id')", DB_NEWS, "news_cat='" . $news_cat_id . "'")) {
                                $result = dbquery("SELECT news_cat_image FROM " . DB_NEWS_CATS . " WHERE news_cat_id='" . intval($news_cat_id) . "'");
                                if (dbrows($result) > 0) {
                                    $photo = dbarray($result);
                                    if (!empty($photo['news_cat_image']) && file_exists(IMAGES_NC . $photo['news_cat_image'])) {
                                        unlink(IMAGES_NC . $photo['news_cat_image']);
                                    }
                                }
                                dbquery("DELETE FROM  " . DB_NEWS_CATS . " WHERE news_cat_id='" . intval($news_cat_id) . "'");
                            } else {
                                addNotice("warning", "Cannot delete News category because there are News Items");
                            }
                            break;
                        default:
                            addNotice("warning", "Category ID {$news_cat_id} is not valid and update aborted");
                            redirect(FUSION_REQUEST);
                    }
                }
            }
            addNotice("success", "News category listing has been updated");
            redirect(FUSION_REQUEST);
        }
        addNotice("warning", "No news category item selected. Please check a news item and try again");
        redirect(FUSION_REQUEST);
    }
    if (isset($_POST['news_clear'])) {
        redirect(FUSION_SELF . $aidlink);
    }
    // Switch to post
    $sql_condition = "";
    $search_string = array();
    if (isset($_POST['p-submit-news_cat_name'])) {
        $search_string['news_cat_name'] = array("input" => form_sanitizer($_POST['news_cat_name'], "", "news_cat_name"), "operator" => "LIKE");
    }
    if (!empty($_POST['news_cat_status']) && isnum($_POST['news_cat_status'])) {
        switch ($_POST['news_cat_status']) {
            case 1:
                // is a draft
                $search_string['news_cat_draft'] = array("input" => 1, "operator" => "=");
                break;
            case 2:
                // is a sticky
                $search_string['news_cat_sticky'] = array("input" => 1, "operator" => "=");
                break;
        }
    }
    if (!empty($_POST['news_cat_visibility'])) {
        $search_string['news_cat_visibility'] = array("input" => form_sanitizer($_POST['news_cat_visibility'], "", "news_cat_visibility"), "operator" => "=");
    }
    if (!empty($_POST['news_cat_language'])) {
        $search_string['news_cat_language'] = array("input" => form_sanitizer($_POST['news_cat_language'], "", "news_cat_language"), "operator" => "=");
    }
    if (!empty($search_string)) {
        foreach ($search_string as $key => $values) {
            $sql_condition .= " AND `{$key}` " . $values['operator'] . ($values['operator'] == "LIKE" ? "'%" : "'") . $values['input'] . ($values['operator'] == "LIKE" ? "%'" : "'");
        }
    }
    $result = dbquery_tree_full(DB_NEWS_CATS, "news_cat_id", "news_cat_parent", "", "SELECT nc.*,\n                            count(n1.news_id) 'news_published',\n                            count(n2.news_id) 'news_draft',\n                            count(n3.news_id) 'news_sticky'\n                            FROM " . DB_NEWS_CATS . " nc\n                            LEFT JOIN " . DB_NEWS . " n1 ON n1.news_id=nc.news_cat_id AND n1.news_draft='0' AND (n1.news_start='0'|| n1.news_start<=NOW()) AND (n1.news_end='0'|| n1.news_end>=NOW())\n                            LEFT JOIN " . DB_NEWS . " n2 ON n2.news_id=nc.news_cat_id AND n2.news_draft='1'\n                            LEFT JOIN " . DB_NEWS . " n3 ON n2.news_id=nc.news_cat_id AND n3.news_sticky='1' AND (n3.news_start='0'|| n3.news_start<=NOW()) AND (n3.news_end='0'|| n3.news_end>=NOW())\n                            WHERE " . (multilang_table("NS") ? "news_cat_language='" . LANGUAGE . "'" : "") . "\n                            {$sql_condition}\n                            GROUP BY news_cat_id\n                            ORDER BY news_cat_parent ASC, news_cat_id ASC LIMIT " . intval($_GET['rowstart']) . ", 20");
    ?>
    <div class="m-t-15">
        <?php 
    echo openform("news_filter", "post", FUSION_REQUEST);
    echo "<div class='clearfix'>\n";
    echo "<div class='pull-right'>\n";
    echo "<a class='btn btn-success btn-sm m-r-10' href='" . clean_request("ref=news_cat_form", array("ref"), FALSE) . "'>Add New</a>";
    echo "<a class='btn btn-default btn-sm m-r-10' onclick=\"run_admin('publish');\"><i class='fa fa-check fa-fw'></i> Publish</a>";
    echo "<a class='btn btn-default btn-sm m-r-10' onclick=\"run_admin('unpublish');\"><i class='fa fa-ban fa-fw'></i> Unpublish</a>";
    echo "<a class='btn btn-default btn-sm m-r-10' onclick=\"run_admin('sticky');\"><i class='fa fa-sticky-note fa-fw'></i> Sticky</a>";
    echo "<a class='btn btn-default btn-sm m-r-10' onclick=\"run_admin('unsticky');\"><i class='fa fa-sticky-note-o fa-fw'></i> Unsticky</a>";
    echo "<a class='btn btn-default btn-sm m-r-10' onclick=\"run_admin('delete');\"><i class='fa fa-trash-o fa-fw'></i> Trash</a>";
    echo "</div>\n";
    ?>
        <script>
            function run_admin(action) {
                $('#table_action').val(action);
                $('#news_table').submit();
            }
        </script>

        <?php 
    $filter_values = array("news_cat_name" => !empty($_POST['news_cat_name']) ? form_sanitizer($_POST['news_cat_name'], "", "news_cat_name") : "", "news_cat_status" => !empty($_POST['news_cat_status']) ? form_sanitizer($_POST['news_cat_status'], "", "news_cat_status") : "", "news_cat_visibility" => !empty($_POST['news_cat_visibility']) ? form_sanitizer($_POST['news_cat_visibility'], "", "news_cat_visibility") : "", "news_cat_language" => !empty($_POST['news_cat_language']) ? form_sanitizer($_POST['news_cat_language'], "", "news_cat_language") : "");
    $filter_empty = TRUE;
    foreach ($filter_values as $val) {
        if ($val) {
            $filter_empty = FALSE;
        }
    }
    echo "<div class='display-inline-block pull-left m-r-10' style='width:300px;'>\n";
    echo form_text("news_cat_name", "", $filter_values['news_cat_name'], array("placeholder" => "News Category Name", "append_button" => TRUE, "append_value" => "<i class='fa fa-search'></i>", "append_form_value" => "search_news", "width" => "250px"));
    echo "</div>\n";
    echo "<div class='display-inline-block'>";
    echo "<a class='btn btn-sm " . ($filter_empty == FALSE ? "btn-info" : " btn-default'") . "' id='toggle_options' href='#'>Search Options\n        <span id='filter_caret' class='fa " . ($filter_empty == FALSE ? "fa-caret-up" : "fa-caret-down") . "'></span></a>\n";
    echo form_button("news_clear", "Clear", "clear");
    echo "</div>\n";
    echo "</div>\n";
    add_to_jquery("\n        \$('#toggle_options').bind('click', function(e) {\n            \$('#news_filter_options').slideToggle();\n            var caret_status = \$('#filter_caret').hasClass('fa-caret-down');\n            if (caret_status == 1) {\n                \$('#filter_caret').removeClass('fa-caret-down').addClass('fa-caret-up');\n                \$(this).removeClass('btn-default').addClass('btn-info');\n            } else {\n                \$('#filter_caret').removeClass('fa-caret-up').addClass('fa-caret-down');\n                \$(this).removeClass('btn-info').addClass('btn-default');\n            }\n        });\n\n        // Select change\n        \$('#news_status, #news_visibility, #news_category, #news_language, #news_author').bind('change', function(e){\n            \$(this).closest('form').submit();\n        });\n        ");
    unset($filter_values['news_text']);
    echo "<div id='news_filter_options'" . ($filter_empty == FALSE ? "" : " style='display:none;'") . ">\n";
    echo "<div class='display-inline-block'>\n";
    echo form_select("news_cat_status", "", $filter_values['news_cat_status'], array("allowclear" => TRUE, "placeholder" => "- Select Status -", "options" => array(0 => "All Status", 1 => "Draft", 2 => "Sticky")));
    echo "</div>\n";
    echo "<div class='display-inline-block'>\n";
    echo form_select("news_cat_visibility", "", $filter_values['news_cat_visibility'], array("allowclear" => TRUE, "placeholder" => "- Select Access -", "options" => fusion_get_groups()));
    echo "</div>\n";
    echo "<div class='display-inline-block'>\n";
    $language_opts = array(0 => "All Language");
    $language_opts += fusion_get_enabled_languages();
    echo form_select("news_cat_language", "", $filter_values['news_cat_language'], array("allowclear" => TRUE, "placeholder" => "- Select Language -", "options" => $language_opts));
    echo "</div>\n";
    echo "</div>\n";
    echo closeform();
    ?>
    </div>

    <?php 
    echo openform("news_table", "post", FUSION_REQUEST);
    echo form_hidden("table_action", "", "");
    display_news_category($result);
    echo closeform();
    echo "<div class='text-center'><a class='btn btn-primary' href='" . ADMIN . "images.php" . $aidlink . "&amp;ifolder=imagesnc'>" . $locale['news_0304'] . "</a><br /><br />\n</div>\n";
}
예제 #13
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();
 }