PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.0
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.0
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 / v1 / includes / Core / Database / FallbackModel.php

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

50 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 use BitCode\BitForm\Core\Database\Model;
6
7 class FallbackModel extends Model
8 {
9 public function changeMetaKey($fieldKey, $name)
10 {
11 $prefix = $this->app_db->prefix;
12 $sql = "UPDATE {$prefix}bitforms_form_entrymeta SET meta_key = '{$fieldKey}' WHERE meta_key = '{$fieldKey}{$name}'";
13
14 return $this->execute($sql);
15 }
16
17 public function changeIntegKey($integId, $conf)
18 {
19 $prefix = $this->app_db->prefix;
20 $sql = "UPDATE {$prefix}bitforms_integration SET integration_details = '%s' WHERE id = %d";
21 $values = [$conf, $integId];
22
23 return $this->execute($sql, $values)->getResult();
24 }
25
26 public function changeWorkflowKey($workflowId, $logics, $workflowAction)
27 {
28 $prefix = $this->app_db->prefix;
29 $sql = "UPDATE {$prefix}bitforms_workflows SET workflow_condition = '%s', workflow_action = '%s' WHERE id = %d";
30 $values = [$logics, $workflowAction, $workflowId];
31 return $this->execute($sql, $values)->getResult();
32 }
33
34 public function changeSuccessMessageKey($messageId, $title, $content)
35 {
36 $prefix = $this->app_db->prefix;
37 $sql = "UPDATE {$prefix}bitforms_success_messages SET message_title = '%s', message_content = '%s' WHERE id = %d";
38 $values = [$title, $content, $messageId];
39 return $this->execute($sql, $values)->getResult();
40 }
41
42 public function changeEmailTempKey($tempId, $sub, $body)
43 {
44 $prefix = $this->app_db->prefix;
45 $sql = "UPDATE {$prefix}bitforms_email_template SET sub = '%s', body = '%s' WHERE id = %d";
46 $values = [$sub, $body, $tempId];
47 return $this->execute($sql, $values)->getResult();
48 }
49 }
50