} $p->vxBodyStart(); $p->vxTop(); $p->vxContainer('pix', $options); break; case 'project_view': if (isset($_GET['project_id'])) { $project_id = intval($_GET['project_id']); $sql = "SELECT zpr_id, zpr_title, zpr_private FROM babel_zen_project WHERE zpr_id = {$project_id}"; $rs = mysql_query($sql, $p->db); if (mysql_num_rows($rs) == 1) { $Project = mysql_fetch_object($rs); mysql_free_result($rs); $p->vxHead($msgSiteTitle = make_plaintext($Project->zpr_title)); $p->vxBodyStart(); $p->vxTop($msgBanner = Vocabulary::site_banner, $keyword = make_single_return($Project->zpr_title, 0)); $p->vxContainer('project_view', $options = $Project); } else { $p->vxHomeBundle(BABEL_HOME_STYLE_DEFAULT); } break; } else { $p->vxHomeBundle(BABEL_HOME_STYLE_DEFAULT); break; } case 'sidebar': $global_has_bottom = false; $p->vxHeadMini('Sidebar', 60, '/sidebar.html'); $p->vxBodyStart(); $p->vxMozillaSidebar(); break;
echo ' ' . $_SESSION['babel_message_comment']; echo '</div>'; $_SESSION['babel_message_comment'] = ''; } } else { $_SESSION['babel_message_comment'] = ''; } echo '<div class="form">'; echo '<table width="500" cellspacing="0" cellpadding="2" border="0">'; echo '<form action="/blog/comment?entry_id=' . $entry_id . '" method="post" id="form_blog_comment">'; echo '<tr><td width="300">Nick name</td><td width="200" rowspan="7"></td></tr>'; echo '<tr><td width="300"><input type="text" name="bec_nick" class="sl" value="' . make_single_return($_default['nick'], 0) . '" /></td></tr>'; echo '<tr><td width="300">E-mail <span class="tip"><small>This will not be published.</small></span></td></tr>'; echo '<tr><td width="300"><input type="text" name="bec_email" class="sl" value="' . make_single_return($_default['email'], 0) . '" /></td></tr>'; echo '<tr><td width="300">Website URL</td></tr>'; 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 <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');
private function vxCreateSubstance($rt) { /* when error */ if ($rt['errors'] > 0) { echo '<div id="main"><span class="text"><table width="385" cellpadding="0" cellspacing="0" border="0">'; echo '<form action="/message/create.vx" method="post">'; echo '<tr><td width="385" height="28" colspan="2" valign="middle"><h3><img src="/img/mtico_mail_new.gif" align="absmiddle" /> ' . Vocabulary::action_composemessage . ' | 有些错误</h3></td></tr>'; echo '<tr><td width="65" height="20" align="right">收件人 </td><td width="320" height="20" align="left"><input type="text" name="msg_receivers" class="sl" value="' . make_single_return($rt['msg_receivers_value']) . '" /></td></tr>'; echo '<tr><td width="65" height="20" align="right"></td><td width="320" height="20" align="left"><span class="tip">'; if ($rt['msg_receivers_error'] > 0) { echo $rt['msg_receivers_error_msg'][$rt['msg_receivers_error']]; } else { echo ' '; } echo '</span></td></tr>'; echo '<tr><td width="65" height="20" align="right" valign="top">消息内容 </td><td width="320" height="120" align="left"><span class="tip"><textarea id="msgBody" name="msg_body" class="ml">' . make_multi_return($rt['msg_body_value']) . '</textarea></td></tr>'; echo '<tr><td width="65" height="20" align="right"></td><td width="320" height="20" align="left"><span class="tip">'; if ($rt['msg_body_error'] > 0) { echo $rt['msg_body_error_msg'][$rt['msg_body_error']]; } else { echo ' '; } echo '</span></td></tr>'; echo '<tr><td width="65" height="20" align="right"></td><td width="320" height="20" align="right"><input type="image" src="/img/mbtn_send.gif" /> </td></tr>'; echo '</form>'; echo '</table></span></div>'; } else { /* when ok */ echo '<div id="main">'; if ($this->User->usr_portrait != '') { $img_p = '/img/p/' . $this->User->usr_portrait . '.' . BABEL_PORTRAIT_EXT; } else { $img_p = '/img/portrait.png'; } echo '<img src="' . $img_p . '" align="left" style="margin: 5px 5px 0px 5px;" class="portrait" />'; echo '<h1>' . make_plaintext($this->User->usr_nick) . ' | 短消息成功发送!</h1>'; echo '<h6>' . $this->User->usr_email . '</h6>'; echo '<h5><br />你口袋里有 ' . $this->User->usr_money_a['str'] . '<h5>'; echo '<span class="text"><br /><br /><img src="/img/mico_msg.gif" align="absmiddle" /> 短消息已经被成功发送到以下收件人:<br /><br />'; foreach ($rt['msg_receivers_n'] as $receiver) { echo ' <input type="button" class="recv" onclick="location.href=' . "'/message/sent.vx';" . '" value="' . make_single_return($receiver) . '" />'; } $count = count($rt['msg_receivers_v']); $expense = BABEL_MSG_PRICE * $count; echo '<hr size="1" color="#CACB98" /><img src="/img/mico_info.gif" align="absmiddle" /> 发送这 ' . $count . ' 条短消息花费了 ' . $expense . ' 个铜币。</span>'; echo '</div>'; } }
public function vxLogin() { $rt = $this->Validator->vxLoginCheck(); if (strtoupper($_SERVER['REQUEST_METHOD']) == 'GET') { $this->vxHeader(Vocabulary::action_login); $this->vxBodyStart(); $this->vxH1(); echo '<div class="content"><small><a href="/' . $_SESSION['babel_page_home_mobile'] . '">' . Vocabulary::site_name . '</a> > ' . Vocabulary::action_login . '</small></div>'; echo '<div class="form">'; echo '<form action="/babel_mobile.php?m=login" method="post">'; echo '用户: <input type="text" name="usr" class="textbox" /><br />'; echo '密码: <input type="password" name="usr_password" class="textbox" /><br />'; echo '<input type="submit" value="登 录" class="go" />'; if (strlen($rt['return']) > 0) { echo '<input type="hidden" name="return" value="' . make_single_return($rt['return']) . '" />'; } echo '</form>'; echo '</div>'; $this->vxBottom(); $this->vxBodyEnd(); $this->vxHTMLEnd(); } else { if ($rt['target'] == 'ok') { $this->User = new User($rt['usr_email_value'], sha1($rt['usr_password_value']), $this->db); $this->User->vxUpdateLogin(); /* start the session now */ $this->User->vxSessionStart(); if ($this->User->vxIsLogin()) { if (isset($rt['return'])) { if (mb_strlen($rt['return'], 'UTF-8') > 0) { $this->URL->vxToRedirect($rt['return']); } } } } $this->vxHeader(Vocabulary::action_login); $this->vxBodyStart(); $this->vxH1(); switch ($rt['target']) { default: case 'welcome': if (isset($_GET['r'])) { if (get_magic_quotes_gpc()) { $rt['return'] = make_single_safe(stripslashes($_GET['r'])); } else { $rt['return'] = make_single_safe($_GET['r']); } } else { $rt['return'] = ''; } echo '<div class="content"><small><a href="/' . $_SESSION['babel_page_home_mobile'] . '">' . Vocabulary::site_name . '</a> > ' . Vocabulary::action_login . '</small></div>'; echo '<div class="form">'; echo '<form action="/babel_mobile.php?m=login" method="post">'; echo '用户: <input type="text" name="usr" class="textbox" /><br />'; echo '密码: <input type="password" name="usr_password" class="textbox" /><br />'; echo '<input type="submit" value="登 录" class="go" />'; if (strlen($rt['return']) > 0) { echo '<input type="hidden" name="return" value="' . make_single_return($rt['return']) . '" />'; } echo '</form>'; echo '</div>'; break; case 'ok': echo '<div class="content"><small>'; echo '<a href="/u/' . urlencode($this->User->usr_nick) . '">' . make_plaintext($this->User->usr_nick) . '</a> - '; echo '<a href="/babel_mobile.php?m=logout">登出</a>'; echo '</small></div>'; echo '<div class="content">欢迎回到 <a href="/' . $_SESSION['babel_page_home_mobile'] . '">' . Vocabulary::site_name . '</a>,你上次登录时间是在 ' . make_descriptive_time($this->User->usr_lastlogin) . '。</div>'; break; case 'error': echo '<div class="content"><small><a href="/' . $_SESSION['babel_page_home_mobile'] . '">' . Vocabulary::site_name . '</a> > ' . Vocabulary::action_login . '</small></div>'; echo '<div class="form">'; echo '<form action="/babel_mobile.php?m=login" method="post"><small class="error">密码或者用户名错误</small><br />'; echo '用户: <input type="text" name="usr" class="textbox" /><br />'; echo '密码: <input type="password" name="usr_password" class="textbox" /><br />'; echo '<input type="submit" value="登 录" class="go" />'; if (strlen($rt['return']) > 0) { echo '<input type="hidden" name="return" value="' . make_single_return($rt['return']) . '" />'; } echo '</form>'; echo '</div>'; break; } $this->vxBottom(); $this->vxBodyEnd(); $this->vxHTMLEnd(); } }
<?php if (isset($keyword)) { $kw = make_single_return($keyword); } else { $kw = ''; } ?> <!-- SiteSearch Google --><form method="get" action="http://www.google.com/custom"><a href="http://www.google.com/" class="var"><img src="/img/favicons/google/google.png" border="0" alt="Google" align="absmiddle"></img></a> <input type="hidden" name="domains" value="v2ex.com;livid.cn"></input><?php echo '<input type="text" id="txt_google_search" class="google_search" name="q" size="15" maxlength="255" value=""></input><br />'; ?> <label><input type="radio" name="sitesearch" value=""></input>Web </label><label><input type="radio" name="sitesearch" value="v2ex.com" checked="checked"></input>V2EX </label><br /><input type="image" name="sa" src="/img/graphite/go.gif" align="absmiddle"></input><input type="hidden" name="client" value="pub-9823529788289591"></input><input type="hidden" name="forid" value="1"></input><input type="hidden" name="ie" value="UTF-8"></input><input type="hidden" name="oe" value="UTF-8"></input><input type="hidden" name="flav" value="0000"></input><input type="hidden" name="sig" value="sPOKErd-NdJXfEEx"></input><input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#FFFFFF;VLC:663399;AH:center;BGC:FFFFFF;LBGC:FFFFFF;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:167;L:http://www.v2ex.com/img/v2ex_site_search.png;S:http://www.v2ex.com;FORID:1;"></input><input type="hidden" name="hl" value="zh-CN"></input></form><!-- SiteSearch Google -->
public function vxBlogEditSave($rt) { $Entry =& $rt['Entry']; $_modes = Weblog::vxGetEditorModes(); $_comment_permissions = Weblog::vxGetCommentPermissions(); $Weblog = new Weblog($Entry->bge_pid); if ($Entry->bge_published != 0) { $published_date = date('Y-n-j', $Entry->bge_published); $published_time = date('G:i:s', $Entry->bge_published); } else { $published_date = date('Y-n-j', time()); $published_time = date('G:i:s', time()); } _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> > ' . $this->User->usr_nick_plain . ' > <a href="/blog/admin.vx">博客网志</a> > <a href="/blog/' . Weblog::DEFAULT_ACTION . '/' . $Weblog->blg_id . '.vx">' . make_plaintext($Weblog->blg_title) . '</a> > ' . make_plaintext($Entry->bge_title) . ' > 编辑文章 <span class="tip_i"><small>alpha</small></span>'; _v_d_e(); _v_b_l_s(); echo '<div align="left"><table cellpadding="5" cellspacing="" border="0" class="form">'; echo '<form action="/blog/edit/save/' . $Entry->bge_id . '.vx" method="post" id="form_blog_edit">'; echo '<tr><td colspan="2" align="left"><h1 class="ititle">'; _v_ico_tango_32('actions/document-new'); echo ' 撰写新文章</h1> <span class="tip_i">刚才提交的数据中有些问题需要修正</span></td></tr>'; echo '<tr><td colspan="2" align="right"><input onfocus="brightBox(this);" onblur="dimBox(this);" type="text" class="sllt" name="bge_title" value="' . make_single_return($rt['bge_title_value'], 0) . '" />'; if ($rt['bge_title_error'] > 0) { echo '<br /><span class="tip_i">' . _vo_ico_silk('exclamation') . ' ' . $rt['bge_title_error_msg'][$rt['bge_title_error']] . '</span>'; } echo '</td></tr>'; echo '<tr><td colspan="2" align="right"><textarea class="ml" rows="30" name="bge_body" style="width: 550px;">' . make_multi_return($rt['bge_body_value'], 0) . '</textarea>'; if ($rt['bge_body_error'] > 0) { echo '<br /><span class="tip_i">' . _vo_ico_silk('exclamation') . ' ' . $rt['bge_body_error_msg'][$rt['bge_body_error']] . '</span>'; } echo '</td></tr>'; echo '<tr><td width="100" align="right">格式</td><td align="left">'; echo '<select name="bge_mode">'; foreach ($_modes as $key => $mode) { if ($rt['bge_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">评论许可</td><td align="left">'; echo '<select name="bge_comment_permission">'; foreach ($_comment_permissions as $key => $mode) { if ($rt['bge_comment_permission_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">标签</td><td align="left"><input onfocus="brightBox(this);" onblur="dimBox(this);" type="text" class="sll" name="bge_tags" value="" /></td></tr>'; echo '<tr><td width="100" align="right">状态</td><td align="left">'; echo '<select name="bge_status">'; if ($rt['bge_status_value'] == 1) { echo '<option value="0">草稿</option>'; echo '<option value="1" selected="selected">公开发布</option>'; } else { echo '<option value="0" selected="selected">草稿</option>'; echo '<option value="1">公开发布</option>'; } echo '</select>'; echo '</td></tr>'; echo '<tr><td width="100" align="right">发布时间</td><td align="left"><input onfocus="brightBox(this);" onblur="dimBox(this);" type="text" class="sl" name="bge_published_date" value="' . $published_date . '" /> <input onfocus="brightBox(this);" onblur="dimBox(this);" type="text" class="sl" name="bge_published_time" value="' . $published_time . '" /></td></tr>'; echo '<tr><td colspan="2" valign="middle" align="right" class="toolbar">'; echo '<input type="submit" value="保存" class="btn_white" /> '; echo '<input type="button" value="取消" class="btn_white" onclick="location.href=' . "'/blog/list/{$Weblog->blg_id}.vx'" . ';" /> '; echo '<input type="button" value="删除" class="btn_white" onclick="if (confirm(' . "'确认删除?'" . ')) { location.href = ' . "'/blog/erase/24.vx'" . '; } else { return false; }" />'; echo '</td></tr>'; echo '</form>'; echo '</table></div>'; _v_d_e(); _v_d_e(); }
" /></td> </tr> <?php if (isset($rt['return'])) { if (trim($rt['return']) != '') { echo '<input type="hidden" value="' . make_single_return($rt['return'], 0) . '" name="return" />'; } } else { if (isset($_GET['r'])) { if (get_magic_quotes_gpc()) { $return = make_single_safe(stripslashes($_GET['r'])); } else { $return = make_single_safe($_GET['r']); } if ($return != '') { echo '<input type="hidden" value="' . make_single_return($return) . '" name="return" />'; } } } ?> </form> </table> </div> <div id="bottom" align="center"> © 2006-2007 <a href="http://<?php echo BABEL_DNS_NAME; ?> /" target="_self"><?php echo Vocabulary::site_name; ?>
$_ing['usr_nick_url'] = urlencode($_ing['usr_nick']); $_ing['img_p'] = $_ing['usr_portrait'] ? CDN_P . 'p/' . $_ing['usr_portrait'] . '_n.jpg' : CDN_P . 'p_' . $_ing['usr_gender'] . '_n.gif'; mysql_free_result($rs); } else { mysql_free_result($rs); $_ing = false; } } header('Content-Type: text/html; charset=UTF-8'); header('Etag: ' . sha1($ing_id)); ?> <html> <head> <meta http-equiv="Content-type" content="text/html;charset=utf-8" /> <meta name="Author" content="<?php echo make_single_return($_ing['usr_nick']); ?> " /> <meta name="Generator" content="Project Babel" /> <title><?php if ($_ing) { echo strip_tags(format_ubb($_ing['ing_doing'])) . ' - ' . Vocabulary::site_name; } else { echo Vocabulary::site_name . '::ING'; } ?> </title> <link rel="stylesheet" type="text/css" href="/css/themes/<?php echo BABEL_THEME; ?> /css_babel.css" />