about.php
1 year ago
button-mce.php
1 year ago
faq.php
1 year ago
feedback.php
1 year ago
metabox.php
1 year ago
settings.php
1 year ago
whatsnew.php
1 year ago
feedback.php
44 lines
| 1 | <?php |
| 2 | |
| 3 | function irp_ui_feedback() { |
| 4 | global $irp; |
| 5 | |
| 6 | $irp->Form->prefix='Feedback'; |
| 7 | if($irp->Check->nonce('irp_feedback', 'irp_feedback')) { |
| 8 | $irp->Check->email('email'); |
| 9 | $irp->Check->value('body'); |
| 10 | |
| 11 | if(!$irp->Check->hasErrors()) { |
| 12 | $irp->Options->setFeedbackEmail($irp->Check->of('email')); |
| 13 | $id=-1; |
| 14 | if($irp->Check->of('track', 0)) { |
| 15 | $id=$irp->Tracking->sendTracking(TRUE); |
| 16 | } |
| 17 | $irp->Check->data['tracking_id']=$id; |
| 18 | $irp->Check->data['plugin']=IRP_PLUGIN_SLUG; |
| 19 | $data=$irp->Utils->remotePost('feedback', $irp->Check->data); |
| 20 | if($data) { |
| 21 | $irp->Options->pushSuccessMessage('FeedbackSuccess'); |
| 22 | } else { |
| 23 | $irp->Options->pushErrorMessage('FeedbackError'); |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | ?> |
| 28 | <br> |
| 29 | <h2><?php $irp->Lang->P('FeedbackHeader')?></h2> |
| 30 | <?php |
| 31 | $irp->Options->writeMessages(); |
| 32 | |
| 33 | $irp->Form->formStarts(); |
| 34 | $irp->Form->text('email', $irp->Options->getFeedbackEmail()); |
| 35 | $irp->Form->textarea('body', '', array('rows'=>5)); |
| 36 | |
| 37 | $irp->Form->leftLabels=FALSE; |
| 38 | $irp->Form->checkbox('track'); |
| 39 | $irp->Form->leftLabels=TRUE; |
| 40 | |
| 41 | $irp->Form->nonce('irp_feedback', 'irp_feedback'); |
| 42 | $irp->Form->submit('Send'); |
| 43 | $irp->Form->formEnds(); |
| 44 | } |