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 / includes / Core / Database / FallbackModel.php

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

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