本帖最后由 qq_21810005 于 2014-12-27 15:20:09 编辑

解决方案 »

  1.   


    <?php
    session_start();
    @header("Content-type: text/html; charset=utf-8"); 
         require_once '../configs/smarty.class.php';
     require_once '../model/replyModel.class.php';
     require_once '../model/reply.class.php';
     $message_id=@$_POST['message_id'];
         $user_id=@$_POST['user_id'];
         $message_title=@$_POST['message_title'];
     $repeate_content=@$_POST['repeate_content'];
     $messageModel7= new MessageModel7();
     $res=$messageModel7->showMessage7();
     $messageModel6=new MessageModel6();   
     $res=$messageModel6->showMessage6();
     $smarty->assign("res",$res);
     $smarty->display("reply.tpl");
    ?>
      

  2.   

    <?php
    require_once 'SqlHelper.class.php';
    class MessageModel7{
    public function showMessage7(){
    $sql="select * from message_info where message_id='".$_GET['res']."'";
    $sqlHelper=new SqlHelper();
    $res=$sqlHelper->execute_dql2($sql);
    return $res; 
    }

    }
    ?>
      

  3.   

    <?php
    require_once 'SqlHelper.class.php';
    class MessageModel6{
    public function showMessage6(){
    $sql="select c.user_name,b.repeate_content from repeate_info b, user_info c where b.user_id=c.user_id and b.message_id= '".@$_GET['res']."'";
        $sqlHelper = new SqlHelper();
    $arr=$sqlHelper->execute_dql2($sql);
    echo $sql;
    return  $arr; 
    }
    }
    ?>