当前位置: 首页>>代码示例>>PHP>>正文


PHP Topic::vxTouch方法代码示例

本文整理汇总了PHP中Topic::vxTouch方法的典型用法代码示例。如果您正苦于以下问题:PHP Topic::vxTouch方法的具体用法?PHP Topic::vxTouch怎么用?PHP Topic::vxTouch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Topic的用法示例。


在下文中一共展示了Topic::vxTouch方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: vxPostCreate

 public function vxPostCreate()
 {
     if ($this->User->vxIsLogin()) {
         if (isset($_GET['topic_id'])) {
             $topic_id = intval($_GET['topic_id']);
             if ($this->Validator->vxExistTopic($topic_id)) {
                 $rt = $this->Validator->vxPostCreateMobileCheck($topic_id, $this->User);
                 if ($rt['errors'] == 0) {
                     $this->Validator->vxPostCreateInsert($rt['topic_id'], $this->User->usr_id, '', $rt['reply_value'], $rt['exp_amount']);
                     $Topic = new Topic($rt['topic_id'], $this->db);
                     $Topic->vxTouch();
                     $Topic->vxUpdatePosts();
                     $this->URL->vxToRedirect($this->URL->vxGetTopicViewMobile($topic_id, $_SESSION['babel_page_topic_last_mobile']));
                 } else {
                     $Topic = new Topic($rt['topic_id'], $this->db);
                     $Node = new Node($Topic->tpc_pid, $this->db);
                     $Section = $Node->vxGetNodeInfo($Node->nod_pid);
                     $this->vxHeader(make_plaintext($Topic->tpc_title) . ' - 回复出错');
                     $this->vxBodyStart();
                     $this->vxH1();
                     echo '<div class="content"><small><a href="/' . $_SESSION['babel_page_home_mobile'] . '">V2EX</a> &gt; ' . make_plaintext($Section->nod_title) . ' &gt; ' . make_plaintext($Node->nod_title) . ' &gt; <a href="/t/' . $Topic->tpc_id . '/' . $_SESSION['babel_page_topic_mobile'] . '">' . make_plaintext($Topic->tpc_title) . '</a> &gt; 回复出错</small></div>';
                     echo '<div class="content"><form action="/post/create/mobile/' . $Topic->tpc_id . '.vx" method="post"><small class="error">' . $rt['reply_error_msg'][$rt['reply_error']] . '</small><br /><textarea name="reply" class="textbox" cols="30" rows="4" maxlength="1000">' . make_multi_return($rt['reply_value']) . '</textarea><br /><input type="submit" value="回 复" class="go" />&nbsp;&nbsp;<input type="button" value="取 消" class="go" onclick="location.href=' . "'/t/{$Topic->tpc_id}/{$_SESSION['babel_page_topic_mobile']}';" . '" /></form></div>';
                     $this->vxBottom();
                     $this->vxBodyEnd();
                     $this->vxHTMLEnd();
                 }
             } else {
                 $this->URL->vxToRedirect($this->vxURL->vxGetHome());
             }
         } else {
             $this->URL->vxToRedirect($this->vxURL->vxGetHome());
         }
     } else {
         if (isset($_GET['topic_id'])) {
             $topic_id = intval($_GET['topic_id']);
             $this->URL->vxToRedirect($this->URL->vxGetLogin($this->URL->vxGetTopicViewMoblie($topic_id)));
         } else {
             $this->URL->vxToRedirect($this->URL->vxGetLogin($this->URL->vxGetHome()));
         }
     }
 }
开发者ID:biaodianfu,项目名称:project-babel,代码行数:41,代码来源:MobileCore.php

示例2: array

         $rt['autistic'] = true;
     }
 }
 if ($rt['out_of_money']) {
     $p->vxHead($msgSiteTitle = Vocabulary::term_out_of_money);
     $p->vxBodyStart();
     $p->vxTop();
     $p->vxContainer('out_of_money');
 } else {
     if ($rt['errors'] == 0) {
         $p->Validator->vxPostCreateInsert($rt['topic_id'], $p->User->usr_id, $rt['pst_title_value'], $rt['pst_content_value'], $rt['exp_amount']);
         if (!isset($_SESSION['babel_page_topic'])) {
             $_SESSION['babel_page_topic'] = 1;
         }
         // $p->vxHead($msgSiteTitle = Vocabulary::action_replytopic, $return = '/topic/view/' . $topic_id . '/' . $_SESSION['babel_page_topic'] . '.html');
         $Topic->vxTouch();
         $Topic->vxUpdatePosts();
         $_pst_content_plain = htmlspecialchars_decode(strip_tags(format_ubb($rt['pst_content_value'])));
         // Start: Send a mail to topic owner
         if ($Topic->usr_sw_notify_reply == 1 && $Topic->tpc_uid != $p->User->usr_id) {
             $mail = array();
             $mail['subject'] = '[' . Vocabulary::site_name . ' 新回复] - ' . make_plaintext($Topic->tpc_title);
             $mail['body'] = "{$Topic->usr_nick},你好!\n\n你发表在 " . Vocabulary::site_name . " 的讨论主题 [ {$Topic->tpc_title} ] 被会员 {$p->User->usr_nick} 在北京时间 " . date('Y-n-j G:i:s', time()) . " 回复了,因此我们发送此邮件给你。\n\n-----------------------------------------------\n" . $_pst_content_plain . "\n-----------------------------------------------\n\n你可以点击下面的地址查看这篇新回复。\n\nhttp://" . BABEL_DNS_NAME . $p->URL->vxGetTopicView($rt['topic_id'], $_SESSION['babel_page_topic']) . "\n\n如果你不想再收到此类邮件,你可以在个人设置中关闭 [ 邮件通知自己的主题的新回复 ] 功能。" . BABEL_AM_SIGNATURE;
             if ($Topic->usr_email_notify != '') {
                 $_receiver = $Topic->usr_email_notify;
             } else {
                 $_receiver = $Topic->usr_email;
             }
             $am = new Airmail($_receiver, $mail['subject'], $mail['body'], $p->db);
             $am->vxSend();
             $am = null;
开发者ID:biaodianfu,项目名称:project-babel,代码行数:31,代码来源:babel.php

示例3: vxPostCreate

 public function vxPostCreate($rt)
 {
     $Topic = new Topic($rt['topic_id'], $this->db);
     $Node = new Node($Topic->tpc_pid, $this->db);
     $Section = $Node->vxGetNodeInfo($Node->nod_sid);
     echo '<div id="main">';
     echo '<div class="blank" align="left">';
     _v_ico_map();
     echo ' <a href="/">' . Vocabulary::site_name . '</a> &gt; <a href="/section/view/' . $Section->nod_id . '.html" target="_self">' . $Section->nod_title . '</a> &gt; <a href="/board/view/' . $Node->nod_id . '.html">' . $Node->nod_title . '</a> &gt; <a href="/topic/view/' . $Topic->tpc_id . '.html">' . make_plaintext($Topic->tpc_title) . '</a> &gt; ' . Vocabulary::action_replytopic . '</div>';
     if ($rt['errors'] > 0) {
         echo '<div class="blank" align="left">';
         _v_ico_silk('exclamation');
         echo ' ' . Vocabulary::msg_submitwrong;
         _v_hr();
         if ($rt['autistic']) {
             echo '<div class="notify">你正在回复的主题位于自闭模式的讨论区中,你只能回复自闭模式的讨论区中你自己创建的主题。</div>';
         }
         echo '<table cellpadding="5" cellspacing="0" border="0" class="form">';
         echo '<form action="/post/create/' . $Topic->tpc_id . '.vx" method="post" id="form_post_create">';
         if ($rt['pst_title_error'] > 0) {
             echo '<tr><td width="100" align="right">回复标题</td><td width="400" align="left"><div class="error" style="width: 308px;"><input type="text" class="sll" name="pst_title" value="' . make_single_return($rt['pst_title_value']) . '" /><br />';
             _v_ico_silk('exclamation');
             echo ' ' . $rt['pst_title_error_msg'][$rt['pst_title_error']] . '</div></td></tr>';
         } else {
             echo '<tr><td width="100" align="right">回复标题</td><td width="400" align="left"><input type="text" class="sll" name="pst_title" value="' . make_single_return($rt['pst_title_value']) . '" /></td></tr>';
         }
         if ($rt['pst_content_error'] > 0) {
             echo '<tr><td width="100" align="right" valign="top">回复内容</td><td width="400" align="left"><div class="error"><textarea rows="15" class="ml" name="pst_content">' . $rt['pst_content_value'] . '</textarea><br />';
             _v_ico_silk('exclamation');
             echo '&nbsp;' . make_multi_return($rt['pst_content_error_msg'][$rt['pst_content_error']]) . '</div></td></tr>';
         } else {
             echo '<tr><td width="100" align="right" valign="top">回复内容</td><td width="400" align="left"><textarea rows="15" class="ml" name="pst_content">' . make_multi_return($rt['pst_content_value']) . '</textarea></td></tr>';
         }
         echo '<td width="500" colspan="3" valign="middle" align="right"><span class="tip">';
         _v_btn_f('立即回复', 'form_post_create');
         echo '</span></td></tr>';
         echo '</form>';
         echo '</table>';
         _v_hr();
         echo '<span class="tip"><img src="/img/pico_left.gif" align="absmiddle" />&nbsp;<a href="/topic/view/' . $Topic->tpc_id . '.html">返回主题 / ' . make_plaintext($Topic->tpc_title) . '</a></span>';
         echo '</div>';
     } else {
         $usr_money_a = $this->User->vxParseMoney(abs($rt['exp_amount']));
         $Topic->vxTouch();
         $Topic->vxUpdatePosts();
         echo '<div class="blank"><span class="text_large"><img src="/img/ico_smile.gif" align="absmiddle" class="home" />主题回复成功</span><br />你已经成功回复了一篇主题,<strong>回复该主题花费了' . $usr_money_a['str'] . '</strong>,将在 3 秒内自动返回到主题<br /><br /><img src="/img/pico_right.gif" align="absmiddle" />&nbsp;<a href="/topic/view/' . $Topic->tpc_id . '/' . $rt['p_cur'] . '.html" target="_self">转到刚才回复的主题 / ' . make_plaintext($Topic->tpc_title) . '</a><br /><br />';
         echo '<img src="/img/pico_right.gif" align="absmiddle" />&nbsp;<a href="/go/' . $Node->nod_name . '">转到主题所在讨论区 / ' . make_plaintext($Node->nod_title) . '</a><br /><br />';
         echo '<img src="/img/pico_right.gif" align="absmiddle" />&nbsp;<a href="/go/' . $Section->nod_name . '">转到主题所在区域 / ' . make_plaintext($Section->nod_title) . '</a><br /><br />';
         echo '<span class="tip">主题 [ <a href="/topic/view/' . $Topic->tpc_id . '/' . $rt['p_cur'] . '.html" class="t">' . make_plaintext($Topic->tpc_title) . '</a> ] 现在有 ' . ($Topic->tpc_posts + 1) . ' 篇回复,感谢你的参与!</span>';
         echo '</div>';
     }
     echo '</div>';
 }
开发者ID:biaodianfu,项目名称:project-babel,代码行数:53,代码来源:V2EXCore.php


注:本文中的Topic::vxTouch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。