PluginProbe ʕ •ᴥ•ʔ
Tracking Code Manager / 1.4
Tracking Code Manager v1.4
trunk 1.11.8 1.11.9 1.12.0 1.12.1 1.12.2 1.12.3 1.4 1.5 2.0.0 2.0.1 2.0.13 2.0.14 2.0.15 2.0.16 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.0 2.2.0 2.3.0 2.4.0 2.5.0 2.6.0
tracking-code-manager / includes / admin / feedback.php
tracking-code-manager / includes / admin Last commit date
about.php 11 years ago editor.php 11 years ago feedback.php 11 years ago manager.php 11 years ago metabox.php 11 years ago settings.php 11 years ago
feedback.php
45 lines
1 <?php
2 /**
3 * Created by PhpStorm.
4 * User: alessio
5 * Date: 29/03/2015
6 * Time: 09:10
7 */
8 function tcm_ui_feedback() {
9 global $tcm;
10
11 $tcm->Form->prefix='Feedback';
12 if($tcm->Check->nonce('tcm_feedback', 'tcm_feedback')) {
13 $tcm->Check->email('email');
14 $tcm->Check->value('body');
15
16 if(!$tcm->Check->hasErrors()) {
17 $tcm->Options->setFeedbackEmail($tcm->Check->of('email'));
18 $id=-1;
19 if($tcm->Check->of('track', 0)) {
20 $id=$tcm->Tracking->sendTracking(TRUE);
21 }
22 $tcm->Check->data['tracking_id']=$id;
23 $data=$tcm->Utils->remotePost('feedback', $tcm->Check->data);
24 if($data) {
25 $tcm->Options->pushSuccessMessage('FeedbackSuccess');
26 } else {
27 $tcm->Options->pushErrorMessage('FeedbackError');
28 }
29 }
30 }
31 ?>
32 <br>
33 <h2><?php $tcm->Lang->P('FeedbackHeader')?></h2>
34 <?php
35 $tcm->Options->writeMessages();
36
37 $tcm->Form->formStarts();
38 $tcm->Form->text('email', $tcm->Options->getFeedbackEmail());
39 $tcm->Form->textarea('body', '', array('rows'=>5));
40 $tcm->Form->checkbox('track');
41
42 $tcm->Form->nonce('tcm_feedback', 'tcm_feedback');
43 $tcm->Form->submit('Contact Us');
44 $tcm->Form->formEnds();
45 }