PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.6.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.6.2
V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 2.10.2 All 137 releases
bit-form / includes / Core / Database / FallbackModel.php

FallbackModel.php in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 2.6.2, at includes/Core/Database/FallbackModel.php

48 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace BitCode\BitForm\Core\Database;
4
5 class FallbackModel extends Model
6 {
7 public function changeMetaKey($fieldKey, $name)
8 {
9 $prefix = $this->app_db->prefix;
10 $sql = "UPDATE {$prefix}bitforms_form_entrymeta SET meta_key = '{$fieldKey}' WHERE meta_key = '{$fieldKey}{$name}'";
11
12 return $this->execute($sql);
13 }
14
15 public function changeIntegKey($integId, $conf)
16 {
17 $prefix = $this->app_db->prefix;
18 $sql = "UPDATE {$prefix}bitforms_integration SET integration_details = '%s' WHERE id = %d";
19 $values = [$conf, $integId];
20
21 return $this->execute($sql, $values)->getResult();
22 }
23
24 public function changeWorkflowKey($workflowId, $logics, $workflowAction)
25 {
26 $prefix = $this->app_db->prefix;
27 $sql = "UPDATE {$prefix}bitforms_workflows SET workflow_condition = '%s', workflow_action = '%s' WHERE id = %d";
28 $values = [$logics, $workflowAction, $workflowId];
29 return $this->execute($sql, $values)->getResult();
30 }
31
32 public function changeSuccessMessageKey($messageId, $title, $content, $config)
33 {
34 $prefix = $this->app_db->prefix;
35 $sql = "UPDATE {$prefix}bitforms_success_messages SET message_title = '%s', message_content = '%s', message_config = '%s' WHERE id = %d";
36 $values = [$title, $content, $config, $messageId];
37 return $this->execute($sql, $values)->getResult();
38 }
39
40 public function changeEmailTempKey($tempId, $sub, $body)
41 {
42 $prefix = $this->app_db->prefix;
43 $sql = "UPDATE {$prefix}bitforms_email_template SET sub = '%s', body = '%s' WHERE id = %d";
44 $values = [$sub, $body, $tempId];
45 return $this->execute($sql, $values)->getResult();
46 }
47 }
48