echo '<tr><td width="300"><input type="text" name="bec_url" class="sl" value="' . make_single_return($_default['url'], 0) . '" /></td></tr>';
            echo '<tr><td width="300">Comment&nbsp;&nbsp;<span class="tip"><small>Some HTML is OK.</small></span></td></tr>';
            echo '<tr><td width="500" colspan="2"><textarea class="ml" rows="10" name="bec_body"></textarea></td></tr>';
            if (!$User->vxIsLogin()) {
                echo '<tr><td width="500" colspan="2" align="left"><span class="info">';
                if ($_default['remember']) {
                    echo '<input checked="checked" class="cb" type="checkbox" name="remember" />';
                } else {
                    echo '<input class="cb" type="checkbox" name="remember" />';
                }
                echo ' <small>Remember me on this computer.</info></td></tr>';
            } else {
                echo '<input type="hidden" name="remember" value="on" />';
            }
            echo '<tr><td width="500" colspan="2" align="left">';
            _v_btn_f('Post', 'form_blog_comment');
            echo '</td></tr>';
            echo '</form>';
            echo '</table>';
            echo '</div>';
        }
    } else {
        echo '<div class="form"><span class="info">';
        _v_ico_silk('information');
        if ($error_friend) {
            echo ' Comment for this entry is only available to the author\'s friends on <a href="http://' . BABEL_DNS_NAME . '/" target="_blank">' . Vocabulary::site_name . '</a>.</span></div>';
        } else {
            echo ' Comment for this entry is closed.</span></div>';
        }
    }
}
Example #2
0
 public function vxBlogConfigSave($rt)
 {
     $_modes = Weblog::vxGetEditorModes();
     $_comment_permissions = Weblog::vxGetCommentPermissions();
     $Weblog = new Weblog($rt['weblog_id']);
     _v_m_s();
     echo '<link type="text/css" rel="stylesheet" href="/css/themes/' . BABEL_THEME . '/css_weblog.css" />';
     _v_b_l_s();
     _v_ico_map();
     echo ' <a href="/">' . Vocabulary::site_name . '</a> &gt; ' . $this->User->usr_nick_plain . ' &gt; <a href="/blog/admin.vx">博客网志</a> &gt; <a href="/blog/' . Weblog::DEFAULT_ACTION . '/' . $Weblog->blg_id . '.vx">' . make_plaintext($Weblog->blg_title) . '</a> &gt; 设置 <span class="tip_i"><small>alpha</small></span>';
     _v_d_e();
     _v_b_l_s();
     _v_ico_silk('cog_edit');
     echo ' 设置博客网站';
     _v_hr();
     echo '<table cellpadding="5" cellspacing="0" border="0" class="form">';
     echo '<form action="/blog/config/save/' . $rt['weblog_id'] . '.vx" method="post" id="form_blog_config">';
     echo '<tr><td width="100" align="right">访问地址</td><td width="400" align="left"><a href="http://' . BABEL_WEBLOG_SITE . '/' . $Weblog->blg_name . '" target="_blank">http://' . BABEL_WEBLOG_SITE . '/' . $Weblog->blg_name . '</a> <img src="/img/ext.png" align="absmiddle" /></td></tr>';
     if ($rt['blg_title_error'] > 0) {
         echo '<tr><td width="100" align="right">标题</td><td width="400" align="left"><div class="error" style="width: 308px;"><input onfocus="brightBox(this);" onblur="dimBox(this);" type="text" class="sll" name="blg_title" value="' . make_single_return($rt['blg_title_value'], 0) . '" /><br />';
         _v_ico_silk('exclamation');
         echo ' ' . $rt['blg_title_error_msg'][$rt['blg_title_error']];
         echo '</div></td></tr>';
     } else {
         echo '<tr><td width="100" align="right">标题</td><td width="400" align="left"><input onfocus="brightBox(this);" onblur="dimBox(this);" type="text" class="sll" name="blg_title" value="' . make_single_return($rt['blg_title_value'], 0) . '" /> ';
         _v_ico_silk('tick');
         echo '</td></tr>';
     }
     if ($rt['blg_description_error'] > 0) {
         echo '<tr><td width="100" align="right" valign="top">简介</td><td width="400" align="left"><div class="error"><textarea onfocus="brightBox(this);" onblur="dimBox(this);" rows="10" class="ml" name="blg_description">' . make_multi_return($rt['blg_description_value'], 0) . '</textarea><br />';
         _v_ico_silk('exclamation');
         echo ' ' . $rt['blg_description_error_msg'][$rt['blg_description_error']];
         echo '</div></td></tr>';
     } else {
         echo '<tr><td width="100" align="right" valign="top">简介</td><td width="400" align="left"><textarea onfocus="brightBox(this);" onblur="dimBox(this);" rows="10" class="ml" name="blg_description">' . make_multi_return($rt['blg_description_value'], 0) . '</textarea></td></tr>';
     }
     echo '<tr><td width="100" align="right">新文章格式</td><td width="400" align="left">';
     echo '<select name="blg_editor">';
     foreach ($_modes as $key => $mode) {
         if ($rt['blg_mode_value'] == $key) {
             echo '<option value="' . $key . '" selected="selected">' . $mode . '</option>';
         } else {
             echo '<option value="' . $key . '">' . $mode . '</option>';
         }
     }
     echo '</select>';
     echo '</td></tr>';
     echo '<tr><td width="100" align="right" valign="top">默认评论许可</td><td width="400" align="left">';
     echo '<select name="blg_comment_permission">';
     foreach ($_comment_permissions as $key => $comment_permission) {
         if ($rt['blg_comment_permission_value'] == $key) {
             echo '<option value="' . $key . '" selected="selected">' . $comment_permission . '</option>';
         } else {
             echo '<option value="' . $key . '">' . $comment_permission . '</option>';
         }
     }
     echo '</select>';
     echo '</td>';
     echo '</tr>';
     echo '<tr><td width="100" align="right" valign="top">授权协议</td><td width="400" align="left">';
     echo '<select name="blg_license">';
     foreach ($_licenses as $name => $license) {
         if ($rt['blg_license_value'] == $name) {
             echo '<option value="' . $name . '" selected="selected">' . $license . '</option>';
         } else {
             echo '<option value="' . $name . '">' . $license . '</option>';
         }
     }
     echo '</select>';
     echo ' ';
     echo '<a href="http://creativecommons.org/about/licenses/meet-the-licenses" target="_blank">';
     _v_ico_silk('information');
     echo '</a>';
     echo '</td>';
     echo '</tr>';
     echo '<tr>';
     echo '<td width="100" align="right" valign="top"><a href="/ing/' . $this->User->usr_nick_url . '" class="regular">ING</a> 集成</td>';
     echo '<td width="400" align="left"><span class="text">';
     if ($rt['blg_ing_value'] == 1) {
         echo '<input type="radio" checked="checked" name="blg_ing" value="1" /> 启用';
         echo '&nbsp;&nbsp;<input type="radio" name="blg_ing" value="0" /> 关闭';
     } else {
         echo '<input type="radio" name="blg_ing" value="1" /> 启用';
         echo '&nbsp;&nbsp;<input type="radio" checked="checked" name="blg_ing" value="0" /> 关闭';
     }
     echo '</span></td>';
     echo '</tr>';
     echo '<tr><td width="500" colspan="3" valign="middle" align="right">';
     _v_btn_f('更新设置', 'form_blog_config');
     echo '</td></tr>';
     echo '</form>';
     echo '</table>';
     _v_hr();
     _v_ico_silk('information');
     echo ' 更新设置后将需要重新构建';
     _v_d_e();
     _v_d_e();
 }