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


PHP Feedback::find方法代码示例

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


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

示例1: postReply

 public function postReply()
 {
     $id = Input::get('m_id');
     $data = Feedback::find($id);
     $email = $data->email;
     $data['message'] = Input::get('message');
     $subject = Input::get('subject');
     $user_data = array('message' => Input::get('message'));
     Mail::send('emails.simple_message', array('data' => $user_data), function ($messages) use($subject, $email) {
         $messages->to($email)->subject($subject);
     });
     return Redirect::back()->with('success', 'Success, Message Replied to <b>' . $email . '</b>');
 }
开发者ID:jencko,项目名称:bbk,代码行数:13,代码来源:FeedbackController.php

示例2: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  *
  * @return void
  */
 public function actionCreate()
 {
     $model = new Feedback();
     if (($data = Yii::app()->getRequest()->getPost('Feedback')) !== null) {
         $model->setAttributes($data);
         if ($model->status == Feedback::STATUS_ANSWER_SENDED) {
             $model->answer_user = Yii::app()->user->getId();
             $model->answer_date = new CDbExpression('NOW()');
         }
         // Порядковый номер
         $criteria = new CDbCriteria();
         $criteria->select = new CDbExpression('MAX(sort) as sort');
         $criteria->condition = 't.type_id = :type_id';
         $criteria->params = array(':type_id' => $model->type_id);
         $max = $model->find($criteria);
         $model->sort = $max->sort + 10;
         if ($model->save()) {
             Yii::app()->user->setFlash(yupe\widgets\YFlashMessages::SUCCESS_MESSAGE, Yii::t('FeedbackModule.feedback', 'Message saved!'));
             $redirect = Yii::app()->getRequest()->getPost('submit-type') == '' ? (array) Yii::app()->getRequest()->getPost('submit-type', array('create')) : Yii::app()->user->getState('prevUrl');
             $this->redirect($redirect);
         }
     }
     $this->render('create', array('model' => $model));
 }
开发者ID:kuzmina-mariya,项目名称:unizaro-stone,代码行数:30,代码来源:FeedbackBackendController.php

示例3: Feedback

<?php

$feedback = new Feedback();
if (Input::get('del') && $_SESSION['role'] == 'Staff') {
    $del = Input::get('del');
    unset($_POST['del']);
    if ($feedback->find($del)) {
        $feedback->delete($del);
        //force refresh
        header('Location: /TCS/' . Input::get('page'));
        exit;
    }
}
if ($_SESSION['role'] == 'Staff') {
    ?>

	<div class="row title-top-pad footer-padding">
	
	<?php 
    if (Input::get('view')) {
        $feedback->find(Input::get('view'));
        ?>

	<h4>View Feedback</h4>

	<h5>Type: <?php 
        echo $feedback->data()->category;
        ?>
</h5>
	<h5>Message:</h5>
	<h6><?php 
开发者ID:NoOneLiv3,项目名称:TCS-Webstore,代码行数:31,代码来源:feedback.php

示例4: function

//FeedBack Functions
//Get Feedback - OK
$app->get("/feedback/get/:job_id", function ($job_id) use($app) {
    $r = Feedback::get_feedback($job_id);
    $app->response->body(json_encode($r));
});
//Update Feedback - OK
$app->post("/feedback/update/", function () use($app) {
    $params = $app->request()->params();
    //Get all aprameters
    $r = Feedback::update_feedback($params);
    $app->response->body(json_encode($r));
});
//Delete Feedback - OK
$app->delete("/feedback/delete/:id", function ($id) use($app) {
    $f = Feedback::find($id);
    $f->delete();
    $app->response->body();
});
//Insert Feedback
$app->post("/feedback/set", function () use($app) {
    $params = $app->request()->params();
    //Get all aprameters
    $set_feedback = JobOffers::set_bid();
    $app->response->body(json_encode($set_feedback));
});
//OFFERS
$app->post("/job/offer", function () use($app) {
    $params = $app->request()->params();
    $new_bid = JobOffers::set_bid($params);
    $app->response->body(json_encode($new_bid));
开发者ID:Mitsaras1911,项目名称:api,代码行数:31,代码来源:index.php

示例5: getView

 public function getView($id)
 {
     return View::make('feedbacks.view')->with('feedback', Feedback::find($id));
 }
开发者ID:tuananhpham94,项目名称:iFixCenter,代码行数:4,代码来源:FeedbacksController.php


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