@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | <tbody> |
33 | 33 | <?php foreach ($packages as $package) : ?> |
34 | 34 | <tr> |
35 | - <td><?php e($package['plan'] . ' '. $package['group']); ?></td> |
|
35 | + <td><?php e($package['plan'].' '.$package['group']); ?></td> |
|
36 | 36 | <td><?php e($package['dk_start_date']); ?></td> |
37 | 37 | <td><?php e($package['dk_end_date']); ?></td> |
38 | 38 | <td><?php e(t($package['status'])); ?></td> |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | <p> DKK <?php e($packages[$group['id']][$plan['id']]['product']['price_incl_vat'].' '.t('per').' '.t($packages[$group['id']][$plan['id']]['product']['unit']['singular'])); ?></p> |
138 | 138 | <?php } ?> |
139 | 139 | |
140 | - <a href="<?php e(url('package/' . $packages[$group['id']][$plan['id']]['id'])); ?>"><?php e(t('choose')); ?></a> |
|
140 | + <a href="<?php e(url('package/'.$packages[$group['id']][$plan['id']]['id'])); ?>"><?php e(t('choose')); ?></a> |
|
141 | 141 | |
142 | 142 | <?php } ?> |
143 | 143 | </td> |
@@ -9,8 +9,11 @@ |
||
9 | 9 | ?> |
10 | 10 | <h3><?php e(t('success!')); ?></h3> |
11 | 11 | <p><?php e(t('if everything went as it should, you can see your packages below, and you should be able to use them now.')); ?></p> |
12 | - <?php else : ?> |
|
13 | - <p><?php e(t('on this page you have an overview of your intraface account')); ?></p> |
|
12 | + <?php else { |
|
13 | + : ?> |
|
14 | + <p><?php e(t('on this page you have an overview of your intraface account')); |
|
15 | +} |
|
16 | +?></p> |
|
14 | 17 | <?php endif; ?> |
15 | 18 | </div> |
16 | 19 |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | $existing_modulepackages = $modulepackagemanager->getList(); |
73 | 73 | |
74 | 74 | // default start date is today |
75 | -if ($add_type == 'extend' && count($existing_modulepackages) > 0 && isset($existing_modulepackages[count($existing_modulepackages)-1]['dk_start_date'])) { |
|
76 | - $end_date_integer = strtotime($existing_modulepackages[count($existing_modulepackages)-1]['end_date']); |
|
75 | +if ($add_type == 'extend' && count($existing_modulepackages) > 0 && isset($existing_modulepackages[count($existing_modulepackages) - 1]['dk_start_date'])) { |
|
76 | + $end_date_integer = strtotime($existing_modulepackages[count($existing_modulepackages) - 1]['end_date']); |
|
77 | 77 | // the new start day is the day after the last package ends |
78 | 78 | $start_date = date('d-m-Y', strtotime('+1 day', $end_date_integer)); |
79 | 79 | } else { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | <option value="24"><?php e('2 '.t('years')); |
134 | 134 | if (isset($product['price_incl_vat'])) : |
135 | 135 | e(' (DKK '.($product['price_incl_vat']*24).')'); |
136 | - endif; ?></option> |
|
136 | + endif; ?></option> |
|
137 | 137 | </select> |
138 | 138 | </div> |
139 | 139 |
@@ -19,8 +19,10 @@ |
||
19 | 19 | <span id="price"><?php $product = $modulepackageshop->getProduct((int)$modulepackage->get('product_id')); |
20 | 20 | if (isset($product['product']['currency']['DKK']['price_incl_vat'])) : |
21 | 21 | e('DKK '.$product['product']['currency']['DKK']['price_incl_vat'].' '.t('per').' '.t($product['product']['unit']['singular'])); |
22 | - else : |
|
22 | + else { |
|
23 | + : |
|
23 | 24 | echo 'free!'; |
25 | + } |
|
24 | 26 | endif; ?></span> |
25 | 27 | </div> |
26 | 28 |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | $this->body('amount'), |
28 | 28 | $this->body('currency'), |
29 | 29 | $language, |
30 | - NET_SCHEME . NET_HOST. $this->url('../', array('status' => 'success')), |
|
31 | - NET_SCHEME . NET_HOST. $this->url('../payment', array('action_store_identifier' => $this->body('action_store_identifier'), 'payment_error' => 'true')), |
|
32 | - NET_SCHEME . NET_HOST. $this->url('/process', array('action_store_identifier' => $this->body('action_store_identifier'))), |
|
30 | + NET_SCHEME.NET_HOST.$this->url('../', array('status' => 'success')), |
|
31 | + NET_SCHEME.NET_HOST.$this->url('../payment', array('action_store_identifier' => $this->body('action_store_identifier'), 'payment_error' => 'true')), |
|
32 | + NET_SCHEME.NET_HOST.$this->url('/process', array('action_store_identifier' => $this->body('action_store_identifier'))), |
|
33 | 33 | $this->query(), |
34 | 34 | $this->body() |
35 | 35 | ); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | 'form_action' => $form_action, |
48 | 48 | 'language' => $language); |
49 | 49 | |
50 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/postform'); |
|
50 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/postform'); |
|
51 | 51 | return $tpl->render($this, $data); |
52 | 52 | } |
53 | 53 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | 'modulepackageshop' => $modulepackageshop, |
37 | 37 | 'modulepackage' => $this->modulepackage, |
38 | 38 | 'kernel' => $this->getKernel()); |
39 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/add-package'); |
|
39 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/add-package'); |
|
40 | 40 | return $tpl->render($this, $data); |
41 | 41 | } |
42 | 42 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | if ($this->getKernel()->intranet->address->get('name') != $this->getKernel()->user->getAddress()->get('name')) { |
87 | 87 | $contact['contactperson'] = $this->getKernel()->user->getAddress()->get('name'); |
88 | 88 | $contact['contactemail'] = $this->getKernel()->user->getAddress()->get('email'); |
89 | - $contact['contactphone'] = $this->getKernel()->user->getAddress()->get('phone'); |
|
89 | + $contact['contactphone'] = $this->getKernel()->user->getAddress()->get('phone'); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | // We add the contact_id. But notice, despite of the bad naming the contact_id is the contact_id in the intranet_maintenance intranet! |
@@ -62,7 +62,7 @@ |
||
62 | 62 | 'email_shared' => $email_shared |
63 | 63 | ); |
64 | 64 | |
65 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/index'); |
|
65 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/index'); |
|
66 | 66 | return $tpl->render($this, $data); |
67 | 67 | } |
68 | 68 |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * @param int id on a ModulePackage |
38 | 38 | * |
39 | 39 | * @return void |
40 | - */ |
|
40 | + */ |
|
41 | 41 | public function __construct($id = 0) |
42 | 42 | { |
43 | 43 | $this->db = MDB2::singleton(DB_DSN); |
@@ -204,18 +204,18 @@ discard block |
||
204 | 204 | $i = 0; |
205 | 205 | $db = $this->dbquery->getRecordset('module_package.id, module_package_plan.plan, module_package_plan.id AS plan_id, module_package.product_id, module_package_group.group_name, module_package_group.id AS group_id'); |
206 | 206 | while ($db->nextRecord()) { |
207 | - $list[$i]['id'] = $db->f('id'); |
|
208 | - $list[$i]['plan'] = $db->f('plan'); |
|
209 | - $list[$i]['plan_id'] = $db->f('plan_id'); |
|
210 | - $list[$i]['group'] = $db->f('group_name'); |
|
211 | - $list[$i]['group_id'] = $db->f('group_id'); |
|
212 | - $list[$i]['product_id'] = $db->f('product_id'); |
|
207 | + $list[$i]['id'] = $db->f('id'); |
|
208 | + $list[$i]['plan'] = $db->f('plan'); |
|
209 | + $list[$i]['plan_id'] = $db->f('plan_id'); |
|
210 | + $list[$i]['group'] = $db->f('group_name'); |
|
211 | + $list[$i]['group_id'] = $db->f('group_id'); |
|
212 | + $list[$i]['product_id'] = $db->f('product_id'); |
|
213 | 213 | if ($db->f('product_id') != 0) { |
214 | 214 | $product_ids[] = $db->f('product_id'); |
215 | 215 | } |
216 | - $list[$i]['modules'] = $this->getModules($db->f('id')); |
|
217 | - $list[$i]['product'] = array(); |
|
218 | - $i++; |
|
216 | + $list[$i]['modules'] = $this->getModules($db->f('id')); |
|
217 | + $list[$i]['product'] = array(); |
|
218 | + $i++; |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | // get all products in one request and add them to the array |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function load() |
58 | 58 | { |
59 | - $result = $this->db->query("SELECT module_package.id, module_package.product_id, module_package_group.group_name AS ".$this->db->quoteIdentifier('group').", module_package_plan.plan, module_package_plan.plan_index, module_package_group.id AS group_id " . |
|
60 | - "FROM module_package " . |
|
61 | - "INNER JOIN module_package_group ON module_package.module_package_group_id = module_package_group.id " . |
|
62 | - "INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id " . |
|
59 | + $result = $this->db->query("SELECT module_package.id, module_package.product_id, module_package_group.group_name AS ".$this->db->quoteIdentifier('group').", module_package_plan.plan, module_package_plan.plan_index, module_package_group.id AS group_id ". |
|
60 | + "FROM module_package ". |
|
61 | + "INNER JOIN module_package_group ON module_package.module_package_group_id = module_package_group.id ". |
|
62 | + "INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ". |
|
63 | 63 | "WHERE module_package.id = ".$this->db->quote($this->id, 'integer')); |
64 | 64 | |
65 | 65 | if (PEAR::isError($result)) { |
@@ -93,8 +93,8 @@ discard block |
||
93 | 93 | $id = intval($id); |
94 | 94 | } |
95 | 95 | |
96 | - $result = $this->db->query("SELECT id, module, limiter " . |
|
97 | - "FROM module_package_module " . |
|
96 | + $result = $this->db->query("SELECT id, module, limiter ". |
|
97 | + "FROM module_package_module ". |
|
98 | 98 | "WHERE module_package_module.module_package_id = ".$this->db->quote($id, 'integer')); |
99 | 99 | |
100 | 100 | if (PEAR::isError($result)) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | public function load() |
62 | 62 | { |
63 | 63 | $db = new DB_Sql; |
64 | - $db->query("SELECT id, name, email, phone, mobile, contact_id FROM contact_person WHERE id = " . $this->id . " LIMIT 1"); |
|
64 | + $db->query("SELECT id, name, email, phone, mobile, contact_id FROM contact_person WHERE id = ".$this->id." LIMIT 1"); |
|
65 | 65 | while ($db->nextRecord()) { |
66 | 66 | $this->value['id'] = $db->f('id'); |
67 | 67 | $this->value['name'] = $db->f('name'); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | if ($this->id > 0) { |
101 | 101 | $sql_type = "UPDATE "; |
102 | - $sql_end = " WHERE id = " . $this->id; |
|
102 | + $sql_end = " WHERE id = ".$this->id; |
|
103 | 103 | } else { |
104 | 104 | $sql_type = "INSERT INTO "; |
105 | 105 | $sql_end = ", date_created = NOW()"; |
@@ -108,15 +108,15 @@ discard block |
||
108 | 108 | |
109 | 109 | $db = MDB2::singleton(DB_DSN); |
110 | 110 | |
111 | - $result = $db->exec($sql_type . "contact_person " . |
|
112 | - "SET " . |
|
113 | - "intranet_id = ".$db->quote($this->contact->kernel->intranet->get("id"), 'integer').", " . |
|
114 | - "name = ".$db->quote($input['name'], 'text').", " . |
|
115 | - "email = ".$db->quote($input['email'], 'text').", " . |
|
116 | - "phone = ".$db->quote($input['phone'], 'text').", " . |
|
117 | - "mobile = ".$db->quote($input['mobile']).", " . |
|
118 | - "contact_id = " . $db->quote($this->contact->get('id'), 'integer') . ", " . |
|
119 | - "date_changed = NOW() " . $sql_end); |
|
111 | + $result = $db->exec($sql_type."contact_person ". |
|
112 | + "SET ". |
|
113 | + "intranet_id = ".$db->quote($this->contact->kernel->intranet->get("id"), 'integer').", ". |
|
114 | + "name = ".$db->quote($input['name'], 'text').", ". |
|
115 | + "email = ".$db->quote($input['email'], 'text').", ". |
|
116 | + "phone = ".$db->quote($input['phone'], 'text').", ". |
|
117 | + "mobile = ".$db->quote($input['mobile']).", ". |
|
118 | + "contact_id = ".$db->quote($this->contact->get('id'), 'integer').", ". |
|
119 | + "date_changed = NOW() ".$sql_end); |
|
120 | 120 | |
121 | 121 | if (PEAR::isError($result)) { |
122 | 122 | throw new Exception('Error in query: '.$result->getUserInfo()); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | public function getList() |
144 | 144 | { |
145 | 145 | $db = new DB_Sql; |
146 | - $db->query("SELECT * FROM contact_person WHERE contact_id = " . $this->contact->get('id')); |
|
146 | + $db->query("SELECT * FROM contact_person WHERE contact_id = ".$this->contact->get('id')); |
|
147 | 147 | $persons = array(); |
148 | 148 | $i = 0; |
149 | 149 | while ($db->nextRecord()) { |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | * @package Intraface_Contact |
4 | 4 | */ |
5 | 5 | |
6 | -require_once dirname(__FILE__) . '/ContactReminder.php'; |
|
6 | +require_once dirname(__FILE__).'/ContactReminder.php'; |
|
7 | 7 | $contact_module = $kernel->useModule('contact'); |
8 | 8 | |
9 | 9 | $contact = new Contact($kernel); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | } |
26 | 26 | $_attention_needed[] = array( |
27 | 27 | 'module' => $contact_module->getName(), |
28 | - 'link' => $contact_module->getPath() .$reminder['contact_id'] . '/memo/' . $reminder['id'], |
|
28 | + 'link' => $contact_module->getPath().$reminder['contact_id'].'/memo/'.$reminder['id'], |
|
29 | 29 | 'msg' => $text.' ('.$reminder['dk_reminder_date'].'): '.$reminder['contact_name'].': '.$reminder['subject'].'.', |
30 | 30 | 'no_translation' => true |
31 | 31 | ); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $this->addPreloadFile('Contact.php'); |
22 | 22 | $this->addPreloadFile('ContactMessage.php'); // kan m�ske slettes |
23 | 23 | $this->addPreloadFile('ContactPerson.php'); |
24 | - $this->addPreloadFile('ContactReminder.php'); |
|
24 | + $this->addPreloadFile('ContactReminder.php'); |
|
25 | 25 | |
26 | 26 | $this->addRequiredShared('email'); |
27 | 27 | $this->addRequiredShared('keyword'); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | // settings |
42 | 42 | // paymentconditions in days |
43 | - $this->includeSettingFile('settings.php'); |
|
43 | + $this->includeSettingFile('settings.php'); |
|
44 | 44 | |
45 | 45 | $this->addSetting('paymentcondition', array(0, 8, 14, 30)); |
46 | 46 | $this->addSetting( |
@@ -51,29 +51,29 @@ discard block |
||
51 | 51 | ) |
52 | 52 | ); |
53 | 53 | |
54 | - $this->addSetting('contact_login_url', array( |
|
54 | + $this->addSetting('contact_login_url', array( |
|
55 | 55 | 0 => 'kundelogin.dk', |
56 | 56 | 1 => 'medlemslogin.dk' |
57 | - )); |
|
57 | + )); |
|
58 | 58 | |
59 | - $this->addSetting( |
|
60 | - 'preferred_invoice', |
|
61 | - array( |
|
59 | + $this->addSetting( |
|
60 | + 'preferred_invoice', |
|
61 | + array( |
|
62 | 62 | 1 => 'pdf', |
63 | 63 | 2 => 'email', |
64 | 64 | 3 => 'electronic' |
65 | - ) |
|
66 | - ); |
|
65 | + ) |
|
66 | + ); |
|
67 | 67 | |
68 | - $this->addSetting( |
|
69 | - 'reminder_status', |
|
70 | - array( |
|
68 | + $this->addSetting( |
|
69 | + 'reminder_status', |
|
70 | + array( |
|
71 | 71 | 0 => '_Invalid type_', |
72 | 72 | 1 => 'created', |
73 | 73 | 2 => 'seen', |
74 | 74 | 3 => 'cancelled' |
75 | - ) |
|
76 | - ); |
|
75 | + ) |
|
76 | + ); |
|
77 | 77 | |
78 | 78 | } |
79 | 79 | } |