Completed
Pull Request — master (#4)
by Michael
01:27
created
class/myiframe.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
     }
52 52
 
53 53
     /**
54
-     * @param $id
54
+     * @param integer $id
55 55
      */
56 56
     public function load($id)
57 57
     {
Please login to merge, or discard this patch.
Indentation   +213 added lines, -213 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 if (!defined('XOOPS_ROOT_PATH')) {
10
-    die('XOOPS root path not defined');
10
+	die('XOOPS root path not defined');
11 11
 }
12 12
 
13 13
 include_once XOOPS_ROOT_PATH . '/kernel/object.php';
@@ -17,51 +17,51 @@  discard block
 block discarded – undo
17 17
  */
18 18
 class Myiframe extends XoopsObject
19 19
 {
20
-    public $db;
20
+	public $db;
21 21
 
22
-    /**
23
-     * myiframe constructor.
24
-     * @param null $id
25
-     */
26
-    public function __construct($id = null)
27
-    {
28
-        $this->db = XoopsDatabaseFactory::getDatabaseConnection();
29
-        $this->initVar('frame_frameid', XOBJ_DTYPE_INT, null, false, 10);
30
-        $this->initVar('frame_created', XOBJ_DTYPE_INT, null, false, 10);
31
-        $this->initVar('frame_uid', XOBJ_DTYPE_INT, null, false, 10);
32
-        $this->initVar('frame_description', XOBJ_DTYPE_TXTBOX, null, false, 255);
33
-        $this->initVar('frame_width', XOBJ_DTYPE_TXTBOX, null, false, 15);
34
-        $this->initVar('frame_height', XOBJ_DTYPE_TXTBOX, null, false, 15);
35
-        $this->initVar('frame_align', XOBJ_DTYPE_INT, null, false, 10);
36
-        $this->initVar('frame_frameborder', XOBJ_DTYPE_INT, null, false, 10);
37
-        $this->initVar('frame_marginwidth', XOBJ_DTYPE_INT, null, false, 10);
38
-        $this->initVar('frame_marginheight', XOBJ_DTYPE_INT, null, false, 10);
39
-        $this->initVar('frame_scrolling', XOBJ_DTYPE_INT, null, false, 10);
40
-        $this->initVar('frame_hits', XOBJ_DTYPE_INT, null, false, 10);
41
-        $this->initVar('frame_url', XOBJ_DTYPE_TXTBOX, null, false, 255);
42
-        if (!empty($id)) {
43
-            if (is_array($id)) {
44
-                $this->assignVars($id);
45
-            } else {
46
-                $this->load((int)$id);
47
-            }
48
-        } else {
49
-            $this->setNew();
50
-        }
51
-    }
22
+	/**
23
+	 * myiframe constructor.
24
+	 * @param null $id
25
+	 */
26
+	public function __construct($id = null)
27
+	{
28
+		$this->db = XoopsDatabaseFactory::getDatabaseConnection();
29
+		$this->initVar('frame_frameid', XOBJ_DTYPE_INT, null, false, 10);
30
+		$this->initVar('frame_created', XOBJ_DTYPE_INT, null, false, 10);
31
+		$this->initVar('frame_uid', XOBJ_DTYPE_INT, null, false, 10);
32
+		$this->initVar('frame_description', XOBJ_DTYPE_TXTBOX, null, false, 255);
33
+		$this->initVar('frame_width', XOBJ_DTYPE_TXTBOX, null, false, 15);
34
+		$this->initVar('frame_height', XOBJ_DTYPE_TXTBOX, null, false, 15);
35
+		$this->initVar('frame_align', XOBJ_DTYPE_INT, null, false, 10);
36
+		$this->initVar('frame_frameborder', XOBJ_DTYPE_INT, null, false, 10);
37
+		$this->initVar('frame_marginwidth', XOBJ_DTYPE_INT, null, false, 10);
38
+		$this->initVar('frame_marginheight', XOBJ_DTYPE_INT, null, false, 10);
39
+		$this->initVar('frame_scrolling', XOBJ_DTYPE_INT, null, false, 10);
40
+		$this->initVar('frame_hits', XOBJ_DTYPE_INT, null, false, 10);
41
+		$this->initVar('frame_url', XOBJ_DTYPE_TXTBOX, null, false, 255);
42
+		if (!empty($id)) {
43
+			if (is_array($id)) {
44
+				$this->assignVars($id);
45
+			} else {
46
+				$this->load((int)$id);
47
+			}
48
+		} else {
49
+			$this->setNew();
50
+		}
51
+	}
52 52
 
53
-    /**
54
-     * @param $id
55
-     */
56
-    public function load($id)
57
-    {
58
-        $sql   = 'SELECT * FROM ' . $this->db->prefix('myiframe') . ' WHERE frame_frameid=' . (int)$id;
59
-        $myrow = $this->db->fetchArray($this->db->query($sql));
60
-        $this->assignVars($myrow);
61
-        if (!$myrow) {
62
-            $this->setNew();
63
-        }
64
-    }
53
+	/**
54
+	 * @param $id
55
+	 */
56
+	public function load($id)
57
+	{
58
+		$sql   = 'SELECT * FROM ' . $this->db->prefix('myiframe') . ' WHERE frame_frameid=' . (int)$id;
59
+		$myrow = $this->db->fetchArray($this->db->query($sql));
60
+		$this->assignVars($myrow);
61
+		if (!$myrow) {
62
+			$this->setNew();
63
+		}
64
+	}
65 65
 }
66 66
 
67 67
 /**
@@ -69,188 +69,188 @@  discard block
 block discarded – undo
69 69
  */
70 70
 class MyiframeMyiframeHandler extends XoopsObjectHandler
71 71
 {
72
-    /**
73
-     * @param bool $isNew
74
-     * @return myiframe
75
-     */
76
-    public function create($isNew = true)
77
-    {
78
-        $object = new Myiframe();
79
-        if ($isNew) {
80
-            $object->setNew();
81
-        }
72
+	/**
73
+	 * @param bool $isNew
74
+	 * @return myiframe
75
+	 */
76
+	public function create($isNew = true)
77
+	{
78
+		$object = new Myiframe();
79
+		if ($isNew) {
80
+			$object->setNew();
81
+		}
82 82
 
83
-        return $object;
84
-    }
83
+		return $object;
84
+	}
85 85
 
86
-    /**
87
-     * @param int $id
88
-     * @return myiframe|null
89
-     */
90
-    public function &get($id)
91
-    {
92
-        $ret = null;
93
-        $sql = 'SELECT * FROM ' . $this->db->prefix('myiframe') . '  WHERE frame_frameid=' . (int)$id;
94
-        if (!$result = $this->db->query($sql)) {
95
-            return $ret;
96
-        }
97
-        $numrows = $this->db->getRowsNum($result);
98
-        if ($numrows == 1) {
99
-            $object = new Myiframe();
100
-            $object->assignVars($this->db->fetchArray($result));
101
-            return $object;
102
-        }
86
+	/**
87
+	 * @param int $id
88
+	 * @return myiframe|null
89
+	 */
90
+	public function &get($id)
91
+	{
92
+		$ret = null;
93
+		$sql = 'SELECT * FROM ' . $this->db->prefix('myiframe') . '  WHERE frame_frameid=' . (int)$id;
94
+		if (!$result = $this->db->query($sql)) {
95
+			return $ret;
96
+		}
97
+		$numrows = $this->db->getRowsNum($result);
98
+		if ($numrows == 1) {
99
+			$object = new Myiframe();
100
+			$object->assignVars($this->db->fetchArray($result));
101
+			return $object;
102
+		}
103 103
 
104
-        return $ret;
105
-    }
104
+		return $ret;
105
+	}
106 106
 
107
-    /**
108
-     * @param XoopsObject $object
109
-     * @param bool        $force
110
-     * @return bool
111
-     */
112
-    public function insert(XoopsObject $object, $force = false)
113
-    {
114
-        if (get_class($object) !== 'myiframe') {
115
-            return false;
116
-        }
117
-        if (!$object->isDirty()) {
118
-            return true;
119
-        }
120
-        if (!$object->cleanVars()) {
121
-            foreach ($object->getErrors() as $oneerror) {
122
-                trigger_error($oneerror);
123
-            }
124
-            return false;
125
-        }
126
-        foreach ($object->cleanVars as $k => $v) {
127
-            ${$k} = $v;
128
-        }
107
+	/**
108
+	 * @param XoopsObject $object
109
+	 * @param bool        $force
110
+	 * @return bool
111
+	 */
112
+	public function insert(XoopsObject $object, $force = false)
113
+	{
114
+		if (get_class($object) !== 'myiframe') {
115
+			return false;
116
+		}
117
+		if (!$object->isDirty()) {
118
+			return true;
119
+		}
120
+		if (!$object->cleanVars()) {
121
+			foreach ($object->getErrors() as $oneerror) {
122
+				trigger_error($oneerror);
123
+			}
124
+			return false;
125
+		}
126
+		foreach ($object->cleanVars as $k => $v) {
127
+			${$k} = $v;
128
+		}
129 129
 
130
-        if ($object->isNew()) {
131
-            $format = 'INSERT INTO %s (frame_created, frame_uid, frame_description, frame_width, frame_height, frame_align, frame_frameborder, frame_marginwidth, frame_marginheight, frame_scrolling, frame_hits, frame_url) VALUES (%u, %u, %s, %s, %s, %d, %d, %d, %d, %d, %u, %s)';
132
-            $sql    = sprintf($format, $this->db->prefix('myiframe'), $frame_created, $frame_uid, $this->db->quoteString($frame_description), $this->db->quoteString($frame_width), $this->db->quoteString($frame_height), $frame_align, $frame_frameborder, $frame_marginwidth, $frame_marginheight,
133
-                              $frame_scrolling, $frame_hits, $this->db->quoteString($frame_url));
134
-            $force  = true;
135
-        } else {
136
-            $format = 'UPDATE %s SET frame_description=%s, frame_width=%s, frame_height=%s, frame_align=%d, frame_frameborder=%d, frame_marginwidth=%d, frame_marginheight=%d, frame_scrolling=%d, frame_hits=%u, frame_url=%s WHERE frame_frameid=%u';
137
-            $sql    = sprintf($format, $this->db->prefix('myiframe'), $this->db->quoteString($frame_description), $this->db->quoteString($frame_width), $this->db->quoteString($frame_height), $frame_align, $frame_frameborder, $frame_marginwidth, $frame_marginheight, $frame_scrolling, $frame_hits,
138
-                              $this->db->quoteString($frame_url), $frame_frameid);
139
-        }
140
-        if (false !== $force) {
141
-            $result = $this->db->queryF($sql);
142
-        } else {
143
-            $result = $this->db->query($sql);
144
-        }
145
-        if (!$result) {
146
-            return false;
147
-        }
148
-        if (empty($frame_frameid)) {
149
-            $frame_frameid = $this->db->getInsertId();
150
-        }
151
-        $object->assignVar('frame_frameid', $frame_frameid);
130
+		if ($object->isNew()) {
131
+			$format = 'INSERT INTO %s (frame_created, frame_uid, frame_description, frame_width, frame_height, frame_align, frame_frameborder, frame_marginwidth, frame_marginheight, frame_scrolling, frame_hits, frame_url) VALUES (%u, %u, %s, %s, %s, %d, %d, %d, %d, %d, %u, %s)';
132
+			$sql    = sprintf($format, $this->db->prefix('myiframe'), $frame_created, $frame_uid, $this->db->quoteString($frame_description), $this->db->quoteString($frame_width), $this->db->quoteString($frame_height), $frame_align, $frame_frameborder, $frame_marginwidth, $frame_marginheight,
133
+							  $frame_scrolling, $frame_hits, $this->db->quoteString($frame_url));
134
+			$force  = true;
135
+		} else {
136
+			$format = 'UPDATE %s SET frame_description=%s, frame_width=%s, frame_height=%s, frame_align=%d, frame_frameborder=%d, frame_marginwidth=%d, frame_marginheight=%d, frame_scrolling=%d, frame_hits=%u, frame_url=%s WHERE frame_frameid=%u';
137
+			$sql    = sprintf($format, $this->db->prefix('myiframe'), $this->db->quoteString($frame_description), $this->db->quoteString($frame_width), $this->db->quoteString($frame_height), $frame_align, $frame_frameborder, $frame_marginwidth, $frame_marginheight, $frame_scrolling, $frame_hits,
138
+							  $this->db->quoteString($frame_url), $frame_frameid);
139
+		}
140
+		if (false !== $force) {
141
+			$result = $this->db->queryF($sql);
142
+		} else {
143
+			$result = $this->db->query($sql);
144
+		}
145
+		if (!$result) {
146
+			return false;
147
+		}
148
+		if (empty($frame_frameid)) {
149
+			$frame_frameid = $this->db->getInsertId();
150
+		}
151
+		$object->assignVar('frame_frameid', $frame_frameid);
152 152
 
153
-        return $frame_frameid;
154
-    }
153
+		return $frame_frameid;
154
+	}
155 155
 
156
-    /**
157
-     * @param XoopsObject $object
158
-     * @param bool        $force
159
-     * @return bool
160
-     */
161
-    public function delete(XoopsObject $object, $force = false)
162
-    {
163
-        if (get_class($object) !== 'myiframe') {
164
-            return false;
165
-        }
166
-        $sql = sprintf('DELETE FROM %s WHERE frame_frameid = %u', $this->db->prefix('myiframe'), $object->getVar('frame_frameid'));
167
-        if (false !== $force) {
168
-            $result = $this->db->queryF($sql);
169
-        } else {
170
-            $result = $this->db->query($sql);
171
-        }
172
-        if (!$result) {
173
-            return false;
174
-        }
156
+	/**
157
+	 * @param XoopsObject $object
158
+	 * @param bool        $force
159
+	 * @return bool
160
+	 */
161
+	public function delete(XoopsObject $object, $force = false)
162
+	{
163
+		if (get_class($object) !== 'myiframe') {
164
+			return false;
165
+		}
166
+		$sql = sprintf('DELETE FROM %s WHERE frame_frameid = %u', $this->db->prefix('myiframe'), $object->getVar('frame_frameid'));
167
+		if (false !== $force) {
168
+			$result = $this->db->queryF($sql);
169
+		} else {
170
+			$result = $this->db->query($sql);
171
+		}
172
+		if (!$result) {
173
+			return false;
174
+		}
175 175
 
176
-        return true;
177
-    }
176
+		return true;
177
+	}
178 178
 
179
-    /**
180
-     * @param null $criteria
181
-     * @param bool $id_as_key
182
-     * @return array
183
-     */
184
-    public function &getObjects($criteria = null, $id_as_key = false)
185
-    {
186
-        $ret   = array();
187
-        $limit = $start = 0;
188
-        $sql   = 'SELECT * FROM ' . $this->db->prefix('myiframe');
189
-        if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
190
-            $sql .= ' ' . $criteria->renderWhere();
191
-            if ($criteria->getSort() !== '') {
192
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
193
-            }
194
-            $limit = $criteria->getLimit();
195
-            $start = $criteria->getStart();
196
-        }
197
-        $result = $this->db->query($sql, $limit, $start);
198
-        if (!$result) {
199
-            return $ret;
200
-        }
201
-        while ($myrow = $this->db->fetchArray($result)) {
202
-            if (!$id_as_key) {
203
-                $ret[] = new Myiframe($myrow);
204
-            } else {
205
-                $ret[$myrow['frame_frameid']] = new Myiframe($myrow);
206
-            }
207
-        }
179
+	/**
180
+	 * @param null $criteria
181
+	 * @param bool $id_as_key
182
+	 * @return array
183
+	 */
184
+	public function &getObjects($criteria = null, $id_as_key = false)
185
+	{
186
+		$ret   = array();
187
+		$limit = $start = 0;
188
+		$sql   = 'SELECT * FROM ' . $this->db->prefix('myiframe');
189
+		if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
190
+			$sql .= ' ' . $criteria->renderWhere();
191
+			if ($criteria->getSort() !== '') {
192
+				$sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
193
+			}
194
+			$limit = $criteria->getLimit();
195
+			$start = $criteria->getStart();
196
+		}
197
+		$result = $this->db->query($sql, $limit, $start);
198
+		if (!$result) {
199
+			return $ret;
200
+		}
201
+		while ($myrow = $this->db->fetchArray($result)) {
202
+			if (!$id_as_key) {
203
+				$ret[] = new Myiframe($myrow);
204
+			} else {
205
+				$ret[$myrow['frame_frameid']] = new Myiframe($myrow);
206
+			}
207
+		}
208 208
 
209
-        return $ret;
210
-    }
209
+		return $ret;
210
+	}
211 211
 
212
-    /**
213
-     * @param null $criteria
214
-     * @return int
215
-     */
216
-    public function getCount($criteria = null)
217
-    {
218
-        $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('myiframe');
219
-        if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
220
-            $sql .= ' ' . $criteria->renderWhere();
221
-        }
222
-        $result = $this->db->query($sql);
223
-        if (!$result) {
224
-            return 0;
225
-        }
226
-        list($count) = $this->db->fetchRow($result);
212
+	/**
213
+	 * @param null $criteria
214
+	 * @return int
215
+	 */
216
+	public function getCount($criteria = null)
217
+	{
218
+		$sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('myiframe');
219
+		if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
220
+			$sql .= ' ' . $criteria->renderWhere();
221
+		}
222
+		$result = $this->db->query($sql);
223
+		if (!$result) {
224
+			return 0;
225
+		}
226
+		list($count) = $this->db->fetchRow($result);
227 227
 
228
-        return $count;
229
-    }
228
+		return $count;
229
+	}
230 230
 
231
-    /**
232
-     * @param null $criteria
233
-     * @return bool
234
-     */
235
-    public function deleteAll($criteria = null)
236
-    {
237
-        $sql = 'DELETE FROM ' . $this->db->prefix('myiframe');
238
-        if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
239
-            $sql .= ' ' . $criteria->renderWhere();
240
-        }
241
-        if (!$result = $this->db->query($sql)) {
242
-            return false;
243
-        }
231
+	/**
232
+	 * @param null $criteria
233
+	 * @return bool
234
+	 */
235
+	public function deleteAll($criteria = null)
236
+	{
237
+		$sql = 'DELETE FROM ' . $this->db->prefix('myiframe');
238
+		if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
239
+			$sql .= ' ' . $criteria->renderWhere();
240
+		}
241
+		if (!$result = $this->db->query($sql)) {
242
+			return false;
243
+		}
244 244
 
245
-        return true;
246
-    }
245
+		return true;
246
+	}
247 247
 
248
-    /**
249
-     * @param $frame_id
250
-     */
251
-    public function updatehits($frame_id)
252
-    {
253
-        $sql = sprintf('UPDATE %s SET frame_hits = frame_hits+1 WHERE frame_frameid=%u', $this->db->prefix('myiframe'), (int)$frame_id);
254
-        $this->db->queryF($sql);
255
-    }
248
+	/**
249
+	 * @param $frame_id
250
+	 */
251
+	public function updatehits($frame_id)
252
+	{
253
+		$sql = sprintf('UPDATE %s SET frame_hits = frame_hits+1 WHERE frame_frameid=%u', $this->db->prefix('myiframe'), (int)$frame_id);
254
+		$this->db->queryF($sql);
255
+	}
256 256
 }
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     die('XOOPS root path not defined');
11 11
 }
12 12
 
13
-include_once XOOPS_ROOT_PATH . '/kernel/object.php';
13
+include_once XOOPS_ROOT_PATH.'/kernel/object.php';
14 14
 
15 15
 /**
16 16
  * Class Myiframe
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             if (is_array($id)) {
44 44
                 $this->assignVars($id);
45 45
             } else {
46
-                $this->load((int)$id);
46
+                $this->load((int) $id);
47 47
             }
48 48
         } else {
49 49
             $this->setNew();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function load($id)
57 57
     {
58
-        $sql   = 'SELECT * FROM ' . $this->db->prefix('myiframe') . ' WHERE frame_frameid=' . (int)$id;
58
+        $sql   = 'SELECT * FROM '.$this->db->prefix('myiframe').' WHERE frame_frameid='.(int) $id;
59 59
         $myrow = $this->db->fetchArray($this->db->query($sql));
60 60
         $this->assignVars($myrow);
61 61
         if (!$myrow) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     public function &get($id)
91 91
     {
92 92
         $ret = null;
93
-        $sql = 'SELECT * FROM ' . $this->db->prefix('myiframe') . '  WHERE frame_frameid=' . (int)$id;
93
+        $sql = 'SELECT * FROM '.$this->db->prefix('myiframe').'  WHERE frame_frameid='.(int) $id;
94 94
         if (!$result = $this->db->query($sql)) {
95 95
             return $ret;
96 96
         }
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
     {
186 186
         $ret   = array();
187 187
         $limit = $start = 0;
188
-        $sql   = 'SELECT * FROM ' . $this->db->prefix('myiframe');
188
+        $sql   = 'SELECT * FROM '.$this->db->prefix('myiframe');
189 189
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
190
-            $sql .= ' ' . $criteria->renderWhere();
190
+            $sql .= ' '.$criteria->renderWhere();
191 191
             if ($criteria->getSort() !== '') {
192
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
192
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
193 193
             }
194 194
             $limit = $criteria->getLimit();
195 195
             $start = $criteria->getStart();
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
      */
216 216
     public function getCount($criteria = null)
217 217
     {
218
-        $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('myiframe');
218
+        $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('myiframe');
219 219
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
220
-            $sql .= ' ' . $criteria->renderWhere();
220
+            $sql .= ' '.$criteria->renderWhere();
221 221
         }
222 222
         $result = $this->db->query($sql);
223 223
         if (!$result) {
@@ -234,9 +234,9 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public function deleteAll($criteria = null)
236 236
     {
237
-        $sql = 'DELETE FROM ' . $this->db->prefix('myiframe');
237
+        $sql = 'DELETE FROM '.$this->db->prefix('myiframe');
238 238
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
239
-            $sql .= ' ' . $criteria->renderWhere();
239
+            $sql .= ' '.$criteria->renderWhere();
240 240
         }
241 241
         if (!$result = $this->db->query($sql)) {
242 242
             return false;
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
      */
251 251
     public function updatehits($frame_id)
252 252
     {
253
-        $sql = sprintf('UPDATE %s SET frame_hits = frame_hits+1 WHERE frame_frameid=%u', $this->db->prefix('myiframe'), (int)$frame_id);
253
+        $sql = sprintf('UPDATE %s SET frame_hits = frame_hits+1 WHERE frame_frameid=%u', $this->db->prefix('myiframe'), (int) $frame_id);
254 254
         $this->db->queryF($sql);
255 255
     }
256 256
 }
Please login to merge, or discard this patch.
include/functions.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 if (!defined('XOOPS_ROOT_PATH')) {
10
-    die('XOOPS root path not defined');
10
+	die('XOOPS root path not defined');
11 11
 }
12 12
 
13 13
 /**
@@ -24,30 +24,30 @@  discard block
 block discarded – undo
24 24
  */
25 25
 function myiframe_getmoduleoption($option, $repmodule = 'myiframe')
26 26
 {
27
-    global $xoopsModuleConfig, $xoopsModule;
28
-    static $tbloptions = array();
29
-    if (is_array($tbloptions) && array_key_exists($option, $tbloptions)) {
30
-        return $tbloptions[$option];
31
-    }
27
+	global $xoopsModuleConfig, $xoopsModule;
28
+	static $tbloptions = array();
29
+	if (is_array($tbloptions) && array_key_exists($option, $tbloptions)) {
30
+		return $tbloptions[$option];
31
+	}
32 32
 
33
-    $retval = false;
34
-    if (isset($xoopsModuleConfig) && (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $repmodule && $xoopsModule->getVar('isactive'))) {
35
-        if (isset($xoopsModuleConfig[$option])) {
36
-            $retval = $xoopsModuleConfig[$option];
37
-        }
38
-    } else {
39
-        $moduleHandler = xoops_getHandler('module');
40
-        $module        = $moduleHandler->getByDirname($repmodule);
41
-        $configHandler = xoops_getHandler('config');
42
-        if ($module) {
43
-            $moduleConfig = $configHandler->getConfigsByCat(0, $module->getVar('mid'));
44
-            if (isset($moduleConfig[$option])) {
45
-                $retval = $moduleConfig[$option];
46
-            }
47
-        }
48
-    }
49
-    $tbloptions[$option] = $retval;
50
-    return $retval;
33
+	$retval = false;
34
+	if (isset($xoopsModuleConfig) && (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $repmodule && $xoopsModule->getVar('isactive'))) {
35
+		if (isset($xoopsModuleConfig[$option])) {
36
+			$retval = $xoopsModuleConfig[$option];
37
+		}
38
+	} else {
39
+		$moduleHandler = xoops_getHandler('module');
40
+		$module        = $moduleHandler->getByDirname($repmodule);
41
+		$configHandler = xoops_getHandler('config');
42
+		if ($module) {
43
+			$moduleConfig = $configHandler->getConfigsByCat(0, $module->getVar('mid'));
44
+			if (isset($moduleConfig[$option])) {
45
+				$retval = $moduleConfig[$option];
46
+			}
47
+		}
48
+	}
49
+	$tbloptions[$option] = $retval;
50
+	return $retval;
51 51
 }
52 52
 
53 53
 /**
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
  */
63 63
 function myiframe_FieldExists($fieldname, $table)
64 64
 {
65
-    global $xoopsDB;
66
-    $result = $xoopsDB->queryF("SHOW COLUMNS FROM	$table LIKE '$fieldname'");
67
-    return ($xoopsDB->getRowsNum($result) > 0);
65
+	global $xoopsDB;
66
+	$result = $xoopsDB->queryF("SHOW COLUMNS FROM	$table LIKE '$fieldname'");
67
+	return ($xoopsDB->getRowsNum($result) > 0);
68 68
 }
69 69
 
70 70
 /**
@@ -82,21 +82,21 @@  discard block
 block discarded – undo
82 82
  */
83 83
 function myiframe_set_metas($page_title = '', $meta_description = '', $meta_keywords = '')
84 84
 {
85
-    global $xoTheme, $xoTheme, $xoopsTpl;
86
-    $xoopsTpl->assign('xoops_pagetitle', $page_title);
87
-    if (isset($xoTheme) && is_object($xoTheme)) {
88
-        if (!empty($meta_keywords)) {
89
-            $xoTheme->addMeta('meta', 'keywords', $meta_keywords);
90
-        }
91
-        if (!empty($meta_description)) {
92
-            $xoTheme->addMeta('meta', 'description', $meta_description);
93
-        }
94
-    } elseif (isset($xoopsTpl) && is_object($xoopsTpl)) {    // Compatibility for old Xoops versions
95
-        if (!empty($meta_keywords)) {
96
-            $xoopsTpl->assign('xoops_meta_keywords', $meta_keywords);
97
-        }
98
-        if (!empty($meta_description)) {
99
-            $xoopsTpl->assign('xoops_meta_description', $meta_description);
100
-        }
101
-    }
85
+	global $xoTheme, $xoTheme, $xoopsTpl;
86
+	$xoopsTpl->assign('xoops_pagetitle', $page_title);
87
+	if (isset($xoTheme) && is_object($xoTheme)) {
88
+		if (!empty($meta_keywords)) {
89
+			$xoTheme->addMeta('meta', 'keywords', $meta_keywords);
90
+		}
91
+		if (!empty($meta_description)) {
92
+			$xoTheme->addMeta('meta', 'description', $meta_description);
93
+		}
94
+	} elseif (isset($xoopsTpl) && is_object($xoopsTpl)) {    // Compatibility for old Xoops versions
95
+		if (!empty($meta_keywords)) {
96
+			$xoopsTpl->assign('xoops_meta_keywords', $meta_keywords);
97
+		}
98
+		if (!empty($meta_description)) {
99
+			$xoopsTpl->assign('xoops_meta_description', $meta_description);
100
+		}
101
+	}
102 102
 }
Please login to merge, or discard this patch.
xoops_version.php 2 patches
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -9,97 +9,97 @@
 block discarded – undo
9 9
 use Xmf\Request;
10 10
 
11 11
 if (!defined('XOOPS_ROOT_PATH')) {
12
-    die('XOOPS root path not defined');
12
+	die('XOOPS root path not defined');
13 13
 }
14 14
 
15 15
 $modversion = array(
16
-    'version'             => 1.66,
17
-    'module_status'       => 'Beta 1',
18
-    'release_date'        => '2017/08/04',
19
-    'name'                => _MI_MYIFRAME_NAME,
20
-    'description'         => _MI_MYIFRAME_DESC,
21
-    'credits'             => '',
22
-    'author'              => 'Instant Zero - http://xoops.instant-zero.com',
23
-    'help'                => '',
24
-    'license'             => 'GPL see LICENSE',
25
-    'official'            => 0,
26
-    'image'               => 'assets/images/myiframe.png',
27
-    'dirname'             => 'myiframe',
28
-    'min_php'             => '5.5',
29
-    'min_db'              => array('mysql' => '5.5'),
30
-    'min_xoops'           => '2.5.8+',
31
-    'min_admin'           => '1.2',
32
-    'module_website_url'  => 'www.xoops.org',
33
-    'module_website_name' => 'XOOPS',
34
-    'module_release'      => '05/07/2017',
35
-    'system_menu'         => 1,
36
-    //sql tables
37
-    'sqlfile'             => array('mysql' => 'sql/mysql.sql'),
38
-    'tables'              => array(
39
-        'myiframe'
40
-    ),
41
-    // Admin
42
-    'hasAdmin'            => 1,
43
-    'adminindex'          => 'admin/index.php',
44
-    'adminmenu'           => 'admin/menu.php',
45
-    // Menu
46
-    'hasMain'             => 1
16
+	'version'             => 1.66,
17
+	'module_status'       => 'Beta 1',
18
+	'release_date'        => '2017/08/04',
19
+	'name'                => _MI_MYIFRAME_NAME,
20
+	'description'         => _MI_MYIFRAME_DESC,
21
+	'credits'             => '',
22
+	'author'              => 'Instant Zero - http://xoops.instant-zero.com',
23
+	'help'                => '',
24
+	'license'             => 'GPL see LICENSE',
25
+	'official'            => 0,
26
+	'image'               => 'assets/images/myiframe.png',
27
+	'dirname'             => 'myiframe',
28
+	'min_php'             => '5.5',
29
+	'min_db'              => array('mysql' => '5.5'),
30
+	'min_xoops'           => '2.5.8+',
31
+	'min_admin'           => '1.2',
32
+	'module_website_url'  => 'www.xoops.org',
33
+	'module_website_name' => 'XOOPS',
34
+	'module_release'      => '05/07/2017',
35
+	'system_menu'         => 1,
36
+	//sql tables
37
+	'sqlfile'             => array('mysql' => 'sql/mysql.sql'),
38
+	'tables'              => array(
39
+		'myiframe'
40
+	),
41
+	// Admin
42
+	'hasAdmin'            => 1,
43
+	'adminindex'          => 'admin/index.php',
44
+	'adminmenu'           => 'admin/menu.php',
45
+	// Menu
46
+	'hasMain'             => 1
47 47
 );
48 48
 
49 49
 // Templates
50 50
 $modversion['templates'] = array(
51
-    array(
52
-        'file'        => 'myiframe.tpl',
53
-        'description' => 'Default template'
54
-    ),
51
+	array(
52
+		'file'        => 'myiframe.tpl',
53
+		'description' => 'Default template'
54
+	),
55 55
 );
56 56
 
57 57
 //Blocks
58 58
 $modversion['blocks'][] = array(
59
-    'file'        => 'myiframe_iframe.php',
60
-    'name'        => _MI_MYIFAME_BNAME1,
61
-    'description' => 'Shows an iframe in a block',
62
-    'show_func'   => 'b_myiframe_iframe_show',
63
-    'edit_func'   => 'b_myiframe_iframe_edit',
64
-    'options'     => '0',
65
-    'template'    => 'myiframe_block_show.tpl'
59
+	'file'        => 'myiframe_iframe.php',
60
+	'name'        => _MI_MYIFAME_BNAME1,
61
+	'description' => 'Shows an iframe in a block',
62
+	'show_func'   => 'b_myiframe_iframe_show',
63
+	'edit_func'   => 'b_myiframe_iframe_edit',
64
+	'options'     => '0',
65
+	'template'    => 'myiframe_block_show.tpl'
66 66
 );
67 67
 
68 68
 global $xoopsDB, $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig;
69 69
 
70 70
 if (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive')) {
71
-    $i = 0;
72
-    include_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php';
73
-    $myts = MyTextSanitizer::getInstance();
74
-    if (myiframe_getmoduleoption('showinmenu')) {
75
-        $sql    = 'SELECT * FROM ' . $xoopsDB->prefix('myiframe') . ' ORDER BY frame_description';
76
-        $result = $xoopsDB->query($sql);
77
-        while ($myrow = $xoopsDB->fetchArray($result)) {
78
-            if (xoops_trim($myrow['frame_description']) !== '') {
79
-                $modversion['sub'][$i]['name'] = $myts->htmlSpecialChars($myrow['frame_description']);
80
-                $modversion['sub'][$i]['url']  = 'index.php?iframeid=' . (int)$myrow['frame_frameid'];
81
-                $i++;
82
-            }
83
-        }
84
-    }
71
+	$i = 0;
72
+	include_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php';
73
+	$myts = MyTextSanitizer::getInstance();
74
+	if (myiframe_getmoduleoption('showinmenu')) {
75
+		$sql    = 'SELECT * FROM ' . $xoopsDB->prefix('myiframe') . ' ORDER BY frame_description';
76
+		$result = $xoopsDB->query($sql);
77
+		while ($myrow = $xoopsDB->fetchArray($result)) {
78
+			if (xoops_trim($myrow['frame_description']) !== '') {
79
+				$modversion['sub'][$i]['name'] = $myts->htmlSpecialChars($myrow['frame_description']);
80
+				$modversion['sub'][$i]['url']  = 'index.php?iframeid=' . (int)$myrow['frame_frameid'];
81
+				$i++;
82
+			}
83
+		}
84
+	}
85 85
 }
86 86
 
87 87
 // Options
88 88
 $modversion['config'][] = [
89
-    'name'        => 'showinmenu',
90
-    'title'       => '_MI_MYIFRAME_OPT0',
91
-    'description' => '_MI_MYIFRAME_OPT0_DSC',
92
-    'formtype'    => 'yesno',
93
-    'valuetype'   => 'int',
94
-    'default'     => 0,
89
+	'name'        => 'showinmenu',
90
+	'title'       => '_MI_MYIFRAME_OPT0',
91
+	'description' => '_MI_MYIFRAME_OPT0_DSC',
92
+	'formtype'    => 'yesno',
93
+	'valuetype'   => 'int',
94
+	'default'     => 0,
95 95
 ];
96 96
 $modversion['config'][] = [
97
-    'name'        => 'showlist',
98
-    'title'       => '_MI_MYIFRAME_OPT1',
99
-    'description' => '_MI_MYIFRAME_OPT1_DSC',
100
-    'formtype'    => 'yesno',
101
-    'valuetype'   => 'int',
102
-    'default'     => 1,
97
+	'name'        => 'showlist',
98
+	'title'       => '_MI_MYIFRAME_OPT1',
99
+	'description' => '_MI_MYIFRAME_OPT1_DSC',
100
+	'formtype'    => 'yesno',
101
+	'valuetype'   => 'int',
102
+	'default'     => 1,
103 103
 ];
104 104
 // Search
105 105
 $modversion['hasSearch'] = 0;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,15 +69,15 @@
 block discarded – undo
69 69
 
70 70
 if (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive')) {
71 71
     $i = 0;
72
-    include_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php';
72
+    include_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
73 73
     $myts = MyTextSanitizer::getInstance();
74 74
     if (myiframe_getmoduleoption('showinmenu')) {
75
-        $sql    = 'SELECT * FROM ' . $xoopsDB->prefix('myiframe') . ' ORDER BY frame_description';
75
+        $sql    = 'SELECT * FROM '.$xoopsDB->prefix('myiframe').' ORDER BY frame_description';
76 76
         $result = $xoopsDB->query($sql);
77 77
         while ($myrow = $xoopsDB->fetchArray($result)) {
78 78
             if (xoops_trim($myrow['frame_description']) !== '') {
79 79
                 $modversion['sub'][$i]['name'] = $myts->htmlSpecialChars($myrow['frame_description']);
80
-                $modversion['sub'][$i]['url']  = 'index.php?iframeid=' . (int)$myrow['frame_frameid'];
80
+                $modversion['sub'][$i]['url']  = 'index.php?iframeid='.(int) $myrow['frame_frameid'];
81 81
                 $i++;
82 82
             }
83 83
         }
Please login to merge, or discard this patch.
blocks/myiframe_iframe.php 2 patches
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -14,35 +14,35 @@  discard block
 block discarded – undo
14 14
  */
15 15
 function b_myiframe_iframe_show($options)
16 16
 {
17
-    $block         = array();
18
-    $tblalign      = array(
19
-        'top',
20
-        'middle',
21
-        'bottom',
22
-        'left',
23
-        'rigth'
24
-    );
25
-    $tblscrolling  = array(
26
-        'yes',
27
-        'no',
28
-        'auto'
29
-    );
30
-    $iframeHandler = xoops_getModuleHandler('myiframe', 'myiframe');
31
-    $frame         = null;
32
-    $frame         = $iframeHandler->get($options[0]);
17
+	$block         = array();
18
+	$tblalign      = array(
19
+		'top',
20
+		'middle',
21
+		'bottom',
22
+		'left',
23
+		'rigth'
24
+	);
25
+	$tblscrolling  = array(
26
+		'yes',
27
+		'no',
28
+		'auto'
29
+	);
30
+	$iframeHandler = xoops_getModuleHandler('myiframe', 'myiframe');
31
+	$frame         = null;
32
+	$frame         = $iframeHandler->get($options[0]);
33 33
 
34
-    if (is_object($frame)) {
35
-        $block['longdesc']     = $frame->getVar('frame_description');
36
-        $block['width']        = $frame->getVar('frame_width');
37
-        $block['height']       = $frame->getVar('frame_height');
38
-        $block['align']        = $tblalign[$frame->getVar('frame_align') - 1];
39
-        $block['frameborder']  = $frame->getVar('frame_frameborder');
40
-        $block['marginwidth']  = $frame->getVar('frame_marginwidth');
41
-        $block['marginheight'] = $frame->getVar('frame_marginheight');
42
-        $block['scrolling']    = $tblscrolling[$frame->getVar('frame_scrolling') - 1];
43
-        $block['url']          = $frame->getVar('frame_url');
44
-    }
45
-    return $block;
34
+	if (is_object($frame)) {
35
+		$block['longdesc']     = $frame->getVar('frame_description');
36
+		$block['width']        = $frame->getVar('frame_width');
37
+		$block['height']       = $frame->getVar('frame_height');
38
+		$block['align']        = $tblalign[$frame->getVar('frame_align') - 1];
39
+		$block['frameborder']  = $frame->getVar('frame_frameborder');
40
+		$block['marginwidth']  = $frame->getVar('frame_marginwidth');
41
+		$block['marginheight'] = $frame->getVar('frame_marginheight');
42
+		$block['scrolling']    = $tblscrolling[$frame->getVar('frame_scrolling') - 1];
43
+		$block['url']          = $frame->getVar('frame_url');
44
+	}
45
+	return $block;
46 46
 }
47 47
 
48 48
 /**
@@ -51,22 +51,22 @@  discard block
 block discarded – undo
51 51
  */
52 52
 function b_myiframe_iframe_edit($options)
53 53
 {
54
-    $iframeHandler = xoops_getModuleHandler('myiframe', 'myiframe');
55
-    $frarray       = array();
56
-    $critere       = new Criteria('1', '1', '=');
57
-    $critere->setSort('frame_description');
58
-    $frarray = $iframeHandler->getObjects($critere);
54
+	$iframeHandler = xoops_getModuleHandler('myiframe', 'myiframe');
55
+	$frarray       = array();
56
+	$critere       = new Criteria('1', '1', '=');
57
+	$critere->setSort('frame_description');
58
+	$frarray = $iframeHandler->getObjects($critere);
59 59
 
60
-    $form = '' . _MB_MYIFRAME_IFRAME . "&nbsp;<select name='options[0]'>";
61
-    foreach ($frarray as $oneframe) {
62
-        $form .= "<option value='" . $oneframe->getVar('frame_frameid') . "'";
63
-        if ($options[0] == $oneframe->getVar('frame_frameid')) {
64
-            $form .= " selected='selected'";
65
-        }
66
-        $form .= '>' . $oneframe->getVar('frame_description') . '</option>';
67
-    }
68
-    $form .= "</select>\n";
69
-    return $form;
60
+	$form = '' . _MB_MYIFRAME_IFRAME . "&nbsp;<select name='options[0]'>";
61
+	foreach ($frarray as $oneframe) {
62
+		$form .= "<option value='" . $oneframe->getVar('frame_frameid') . "'";
63
+		if ($options[0] == $oneframe->getVar('frame_frameid')) {
64
+			$form .= " selected='selected'";
65
+		}
66
+		$form .= '>' . $oneframe->getVar('frame_description') . '</option>';
67
+	}
68
+	$form .= "</select>\n";
69
+	return $form;
70 70
 }
71 71
 
72 72
 /**
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
  */
75 75
 function b_myiframe_iframe_onthefly($options)
76 76
 {
77
-    $options = explode('|', $options);
78
-    $block   = &b_myiframe_iframe_show($options);
77
+	$options = explode('|', $options);
78
+	$block   = &b_myiframe_iframe_show($options);
79 79
 
80
-    $tpl = new XoopsTpl();
81
-    $tpl->assign('block', $block);
82
-    $tpl->display('db:myiframe_block_show.tpl');
80
+	$tpl = new XoopsTpl();
81
+	$tpl->assign('block', $block);
82
+	$tpl->display('db:myiframe_block_show.tpl');
83 83
 }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * ****************************************************************************
7 7
  */
8 8
 
9
-include_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php';
9
+include_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
10 10
 
11 11
 /**
12 12
  * @param $options
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         'left',
23 23
         'rigth'
24 24
     );
25
-    $tblscrolling  = array(
25
+    $tblscrolling = array(
26 26
         'yes',
27 27
         'no',
28 28
         'auto'
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
         $block['longdesc']     = $frame->getVar('frame_description');
36 36
         $block['width']        = $frame->getVar('frame_width');
37 37
         $block['height']       = $frame->getVar('frame_height');
38
-        $block['align']        = $tblalign[$frame->getVar('frame_align') - 1];
38
+        $block['align']        = $tblalign[$frame->getVar('frame_align')-1];
39 39
         $block['frameborder']  = $frame->getVar('frame_frameborder');
40 40
         $block['marginwidth']  = $frame->getVar('frame_marginwidth');
41 41
         $block['marginheight'] = $frame->getVar('frame_marginheight');
42
-        $block['scrolling']    = $tblscrolling[$frame->getVar('frame_scrolling') - 1];
42
+        $block['scrolling']    = $tblscrolling[$frame->getVar('frame_scrolling')-1];
43 43
         $block['url']          = $frame->getVar('frame_url');
44 44
     }
45 45
     return $block;
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
     $critere->setSort('frame_description');
58 58
     $frarray = $iframeHandler->getObjects($critere);
59 59
 
60
-    $form = '' . _MB_MYIFRAME_IFRAME . "&nbsp;<select name='options[0]'>";
60
+    $form = ''._MB_MYIFRAME_IFRAME."&nbsp;<select name='options[0]'>";
61 61
     foreach ($frarray as $oneframe) {
62
-        $form .= "<option value='" . $oneframe->getVar('frame_frameid') . "'";
62
+        $form .= "<option value='".$oneframe->getVar('frame_frameid')."'";
63 63
         if ($options[0] == $oneframe->getVar('frame_frameid')) {
64 64
             $form .= " selected='selected'";
65 65
         }
66
-        $form .= '>' . $oneframe->getVar('frame_description') . '</option>';
66
+        $form .= '>'.$oneframe->getVar('frame_description').'</option>';
67 67
     }
68 68
     $form .= "</select>\n";
69 69
     return $form;
Please login to merge, or discard this patch.
admin/manage.php 3 patches
Indentation   +212 added lines, -212 removed lines patch added patch discarded remove patch
@@ -11,20 +11,20 @@  discard block
 block discarded – undo
11 11
 
12 12
 // Verify if the table is up to date
13 13
 if (!myiframe_FieldExists('frame_frameid', $xoopsDB->prefix('myiframe'))) {
14
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `frameid` `frame_frameid` INT( 8 ) NOT NULL AUTO_INCREMENT');
15
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `created` `frame_created` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
16
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `uid` `frame_uid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
17
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `longdesc` `frame_description` VARCHAR( 255 ) NOT NULL');
18
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `width` `frame_width` VARCHAR( 15 ) NOT NULL');
19
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `height` `frame_height` VARCHAR( 15 ) NOT NULL');
20
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `align` `frame_align` SMALLINT( 2 ) NOT NULL DEFAULT '0'");
21
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `frameborder` `frame_frameborder` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
22
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `marginwidth` `frame_marginwidth` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
23
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `marginheight` `frame_marginheight` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
24
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `scrolling` `frame_scrolling` SMALLINT( 1 ) NOT NULL DEFAULT '0'");
25
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `hits` `frame_hits` INT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
26
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `url` `frame_url` VARCHAR( 255 ) NOT NULL');
27
-    header('Location : ' . XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=myiframe');
14
+	$result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `frameid` `frame_frameid` INT( 8 ) NOT NULL AUTO_INCREMENT');
15
+	$result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `created` `frame_created` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
16
+	$result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `uid` `frame_uid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
17
+	$result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `longdesc` `frame_description` VARCHAR( 255 ) NOT NULL');
18
+	$result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `width` `frame_width` VARCHAR( 15 ) NOT NULL');
19
+	$result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `height` `frame_height` VARCHAR( 15 ) NOT NULL');
20
+	$result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `align` `frame_align` SMALLINT( 2 ) NOT NULL DEFAULT '0'");
21
+	$result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `frameborder` `frame_frameborder` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
22
+	$result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `marginwidth` `frame_marginwidth` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
23
+	$result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `marginheight` `frame_marginheight` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
24
+	$result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `scrolling` `frame_scrolling` SMALLINT( 1 ) NOT NULL DEFAULT '0'");
25
+	$result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `hits` `frame_hits` INT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
26
+	$result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `url` `frame_url` VARCHAR( 255 ) NOT NULL');
27
+	header('Location : ' . XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=myiframe');
28 28
 }
29 29
 
30 30
 $module_id     = $xoopsModule->getVar('mid');
@@ -48,48 +48,48 @@  discard block
 block discarded – undo
48 48
  */
49 49
 function addEditForm($frameid, $Action, $FormTitle, $longdesc, $width, $height, $align, $frameborder, $marginwidth, $marginheight, $scrolling, $url, $LabelSubmitButton)
50 50
 {
51
-    include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
52
-    global $xoopsModule;
51
+	include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
52
+	global $xoopsModule;
53 53
 
54
-    $sform = new XoopsThemeForm($FormTitle, 'indexform', XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php');
55
-    $sform->addElement(new XoopsFormText(_AM_MYIFRAME_DESC, 'longdesc', 50, 255, $longdesc), false);
56
-    $sform->addElement(new XoopsFormText(_AM_MYIFRAME_WIDTH, 'width', 10, 15, $width), false);
57
-    $sform->addElement(new XoopsFormText(_AM_MYIFRAME_HEIGHT, 'height', 10, 15, $height), false);
54
+	$sform = new XoopsThemeForm($FormTitle, 'indexform', XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php');
55
+	$sform->addElement(new XoopsFormText(_AM_MYIFRAME_DESC, 'longdesc', 50, 255, $longdesc), false);
56
+	$sform->addElement(new XoopsFormText(_AM_MYIFRAME_WIDTH, 'width', 10, 15, $width), false);
57
+	$sform->addElement(new XoopsFormText(_AM_MYIFRAME_HEIGHT, 'height', 10, 15, $height), false);
58 58
 
59
-    $selalign = new XoopsFormSelect(_AM_MYIFRAME_ALIGN, 'align', $align);
60
-    $selalign->addOption(1, _AM_MYIFRAME_ALIGN_TOP);
61
-    $selalign->addOption(2, _AM_MYIFRAME_ALIGN_MIDDLE);
62
-    $selalign->addOption(3, _AM_MYIFRAME_ALIGN_BOTTOM);
63
-    $selalign->addOption(4, _AM_MYIFRAME_ALIGN_LEFT);
64
-    $selalign->addOption(5, _AM_MYIFRAME_ALIGN_RIGHT);
65
-    $selalign->setValue($align);
66
-    $sform->addElement($selalign);
59
+	$selalign = new XoopsFormSelect(_AM_MYIFRAME_ALIGN, 'align', $align);
60
+	$selalign->addOption(1, _AM_MYIFRAME_ALIGN_TOP);
61
+	$selalign->addOption(2, _AM_MYIFRAME_ALIGN_MIDDLE);
62
+	$selalign->addOption(3, _AM_MYIFRAME_ALIGN_BOTTOM);
63
+	$selalign->addOption(4, _AM_MYIFRAME_ALIGN_LEFT);
64
+	$selalign->addOption(5, _AM_MYIFRAME_ALIGN_RIGHT);
65
+	$selalign->setValue($align);
66
+	$sform->addElement($selalign);
67 67
 
68
-    $sform->addElement(new XoopsFormText(_AM_MYIFRAME_FRAMEBORDER, 'frameborder', 3, 3, $frameborder), false);
69
-    $sform->addElement(new XoopsFormText(_AM_MYIFRAME_MARGINWIDTH, 'marginwidth', 3, 3, $marginwidth), false);
70
-    $sform->addElement(new XoopsFormText(_AM_MYIFRAME_MARGINHEIGHT, 'marginheight', 3, 3, $marginheight), false);
68
+	$sform->addElement(new XoopsFormText(_AM_MYIFRAME_FRAMEBORDER, 'frameborder', 3, 3, $frameborder), false);
69
+	$sform->addElement(new XoopsFormText(_AM_MYIFRAME_MARGINWIDTH, 'marginwidth', 3, 3, $marginwidth), false);
70
+	$sform->addElement(new XoopsFormText(_AM_MYIFRAME_MARGINHEIGHT, 'marginheight', 3, 3, $marginheight), false);
71 71
 
72
-    $selscroll = new XoopsFormSelect(_AM_MYIFRAME_SCROLLING, 'scrolling', $scrolling);
73
-    $selscroll->addOption(1, _YES);
74
-    $selscroll->addOption(2, _NO);
75
-    $selscroll->addOption(3, _AM_MYIFRAME_AUTO);
76
-    $selscroll->setValue($scrolling);
77
-    $sform->addElement($selscroll);
72
+	$selscroll = new XoopsFormSelect(_AM_MYIFRAME_SCROLLING, 'scrolling', $scrolling);
73
+	$selscroll->addOption(1, _YES);
74
+	$selscroll->addOption(2, _NO);
75
+	$selscroll->addOption(3, _AM_MYIFRAME_AUTO);
76
+	$selscroll->setValue($scrolling);
77
+	$sform->addElement($selscroll);
78 78
 
79
-    $sform->addElement(new XoopsFormText(_AM_MYIFRAME_URL, 'url', 50, 255, $url), true);
80
-    $sform->addElement(new XoopsFormHidden('op', $Action), false);
81
-    if (!empty($frameid)) {
82
-        $sform->addElement(new XoopsFormHidden('frameid', $frameid), false);
83
-    }
79
+	$sform->addElement(new XoopsFormText(_AM_MYIFRAME_URL, 'url', 50, 255, $url), true);
80
+	$sform->addElement(new XoopsFormHidden('op', $Action), false);
81
+	if (!empty($frameid)) {
82
+		$sform->addElement(new XoopsFormHidden('frameid', $frameid), false);
83
+	}
84 84
 
85
-    $button_tray = new XoopsFormElementTray('', '');
86
-    $submit_btn  = new XoopsFormButton('', 'submit', $LabelSubmitButton, 'submit');
87
-    $button_tray->addElement($submit_btn);
88
-    $cancel_btn = new XoopsFormButton('', 'reset', _AM_MYIFRAME_RESETBUTTON, 'reset');
89
-    $button_tray->addElement($cancel_btn);
90
-    $sform->addElement($button_tray);
91
-    $sform->display();
92
-    include_once __DIR__ . '/admin_footer.php';
85
+	$button_tray = new XoopsFormElementTray('', '');
86
+	$submit_btn  = new XoopsFormButton('', 'submit', $LabelSubmitButton, 'submit');
87
+	$button_tray->addElement($submit_btn);
88
+	$cancel_btn = new XoopsFormButton('', 'reset', _AM_MYIFRAME_RESETBUTTON, 'reset');
89
+	$button_tray->addElement($cancel_btn);
90
+	$sform->addElement($button_tray);
91
+	$sform->display();
92
+	include_once __DIR__ . '/admin_footer.php';
93 93
 }
94 94
 
95 95
 // ******************************************************************************************************************************************
@@ -97,178 +97,178 @@  discard block
 block discarded – undo
97 97
 // ******************************************************************************************************************************************
98 98
 
99 99
 if (isset($_POST['op'])) {
100
-    $op = $_POST['op'];
100
+	$op = $_POST['op'];
101 101
 } elseif (isset($_GET['op'])) {
102
-    $op = $_GET['op'];
102
+	$op = $_GET['op'];
103 103
 }
104 104
 
105 105
 switch ($op) {
106
-    case 'verifybeforeedit':
107
-        if (isset($_POST['submit']) && $_POST['submit'] !== '') {
108
-            if ($_POST['longdesc'] === '') {
109
-                xoops_cp_header();
110
-                $adminObject = \Xmf\Module\Admin::getInstance();
111
-                $adminObject->displayNavigation(basename(__FILE__));
112
-                echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
113
-                echo '<tr><td class="odd">';
114
-                echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
115
-                echo _AM_MYIFRAME_ERROR_ADD_INDEX;
116
-                echo '</td></tr></table>';
117
-                include_once __DIR__ . '/admin_footer.php';
118
-                xoops_cp_footer();
119
-                exit();
120
-            }
106
+	case 'verifybeforeedit':
107
+		if (isset($_POST['submit']) && $_POST['submit'] !== '') {
108
+			if ($_POST['longdesc'] === '') {
109
+				xoops_cp_header();
110
+				$adminObject = \Xmf\Module\Admin::getInstance();
111
+				$adminObject->displayNavigation(basename(__FILE__));
112
+				echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
113
+				echo '<tr><td class="odd">';
114
+				echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
115
+				echo _AM_MYIFRAME_ERROR_ADD_INDEX;
116
+				echo '</td></tr></table>';
117
+				include_once __DIR__ . '/admin_footer.php';
118
+				xoops_cp_footer();
119
+				exit();
120
+			}
121 121
 
122
-            $frameid = $_POST['frameid'];
123
-            $frame   = $iframeHandler->get($frameid);
124
-            $frame->unsetNew();
125
-            $frame->setVar('frame_description', $_POST['longdesc']);
126
-            $frame->setVar('frame_width', $_POST['width']);
127
-            $frame->setVar('frame_height', $_POST['height']);
128
-            $frame->setVar('frame_align', $_POST['align']);
129
-            $frame->setVar('frame_frameborder', $_POST['frameborder']);
130
-            $frame->setVar('frame_marginwidth', $_POST['marginwidth']);
131
-            $frame->setVar('frame_marginheight', $_POST['marginheight']);
132
-            $frame->setVar('frame_scrolling', $_POST['scrolling']);
133
-            $frame->setVar('frame_url', $_POST['url']);
134
-            $frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
135
-            $res = $iframeHandler->insert($frame);
136
-            if (!$res) {
137
-                redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_MODIFY_DB);
138
-                exit();
139
-            }
140
-            redirect_header('manage.php', 1, _AM_MYIFRAME_DBUPDATED);
141
-            exit();
142
-        }
143
-        break;
122
+			$frameid = $_POST['frameid'];
123
+			$frame   = $iframeHandler->get($frameid);
124
+			$frame->unsetNew();
125
+			$frame->setVar('frame_description', $_POST['longdesc']);
126
+			$frame->setVar('frame_width', $_POST['width']);
127
+			$frame->setVar('frame_height', $_POST['height']);
128
+			$frame->setVar('frame_align', $_POST['align']);
129
+			$frame->setVar('frame_frameborder', $_POST['frameborder']);
130
+			$frame->setVar('frame_marginwidth', $_POST['marginwidth']);
131
+			$frame->setVar('frame_marginheight', $_POST['marginheight']);
132
+			$frame->setVar('frame_scrolling', $_POST['scrolling']);
133
+			$frame->setVar('frame_url', $_POST['url']);
134
+			$frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
135
+			$res = $iframeHandler->insert($frame);
136
+			if (!$res) {
137
+				redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_MODIFY_DB);
138
+				exit();
139
+			}
140
+			redirect_header('manage.php', 1, _AM_MYIFRAME_DBUPDATED);
141
+			exit();
142
+		}
143
+		break;
144 144
 
145
-    case 'edit':
146
-        xoops_cp_header();
147
-        $adminObject = \Xmf\Module\Admin::getInstance();
148
-        $adminObject->displayNavigation(basename(__FILE__));
149
-        if (isset($_GET['frameid'])) {
150
-            $frameid = (int)$_GET['frameid'];
151
-            $frame   = $iframeHandler->get($frameid);
152
-            AddEditForm($frameid, 'verifybeforeedit', _AM_MYIFRAME_CONFIG, $frame->getVar('frame_description', 'e'), $frame->getVar('frame_width', 'e'), $frame->getVar('frame_height', 'e'), $frame->getVar('frame_align', 'e'),
153
-                        $frame->getVar('frame_frameborder', 'e'), $frame->getVar('frame_marginwidth', 'e'), $frame->getVar('frame_marginheight', 'e'), $frame->getVar('frame_scrolling', 'e'), $frame->getVar('frame_url', 'e'), _AM_MYIFRAME_UPDATE);
154
-        } else {
155
-            xoops_cp_header();
156
-            $adminObject = \Xmf\Module\Admin::getInstance();
157
-            $adminObject->displayNavigation(basename(__FILE__));
158
-            echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
159
-            echo '<tr><td class="odd">';
160
-            echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
161
-            echo _AM_MYIFRAME_ERROR_ADD_INDEX;
162
-            echo "</td></tr></table>\n";
163
-            include_once __DIR__ . '/admin_footer.php';
164
-            xoops_cp_footer();
165
-            exit();
166
-        }
167
-        break;
145
+	case 'edit':
146
+		xoops_cp_header();
147
+		$adminObject = \Xmf\Module\Admin::getInstance();
148
+		$adminObject->displayNavigation(basename(__FILE__));
149
+		if (isset($_GET['frameid'])) {
150
+			$frameid = (int)$_GET['frameid'];
151
+			$frame   = $iframeHandler->get($frameid);
152
+			AddEditForm($frameid, 'verifybeforeedit', _AM_MYIFRAME_CONFIG, $frame->getVar('frame_description', 'e'), $frame->getVar('frame_width', 'e'), $frame->getVar('frame_height', 'e'), $frame->getVar('frame_align', 'e'),
153
+						$frame->getVar('frame_frameborder', 'e'), $frame->getVar('frame_marginwidth', 'e'), $frame->getVar('frame_marginheight', 'e'), $frame->getVar('frame_scrolling', 'e'), $frame->getVar('frame_url', 'e'), _AM_MYIFRAME_UPDATE);
154
+		} else {
155
+			xoops_cp_header();
156
+			$adminObject = \Xmf\Module\Admin::getInstance();
157
+			$adminObject->displayNavigation(basename(__FILE__));
158
+			echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
159
+			echo '<tr><td class="odd">';
160
+			echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
161
+			echo _AM_MYIFRAME_ERROR_ADD_INDEX;
162
+			echo "</td></tr></table>\n";
163
+			include_once __DIR__ . '/admin_footer.php';
164
+			xoops_cp_footer();
165
+			exit();
166
+		}
167
+		break;
168 168
 
169
-    case 'delete':
170
-        if (!isset($_POST['ok'])) {
171
-            xoops_cp_header();
172
-            $adminObject = \Xmf\Module\Admin::getInstance();
173
-            $adminObject->displayNavigation(basename(__FILE__));
174
-            echo '<h4>' . _AM_MYIFRAME_CONFIG . '</h4>';
175
-            xoops_confirm(array(
176
-                              'op'      => 'delete',
177
-                              'frameid' => (int)$_GET['frameid'],
178
-                              'ok'      => 1
179
-                          ), 'manage.php', _AM_MYIFRAME_RUSUREDEL);
180
-            include_once __DIR__ . '/admin_footer.php';
181
-        } else {
182
-            if (empty($_POST['frameid'])) {
183
-                redirect_header('manage.php', 2, _AM_MYIFRAME_ERROR_ADD_INDEX);
184
-                exit();
185
-            }
186
-            $frameid = (int)$_POST['frameid'];
187
-            $critere = new Criteria('frame_frameid', $frameid, '=');
188
-            $iframeHandler->deleteAll($critere);
189
-            redirect_header('manage.php', 1, _AM_MYIFRAME_DBUPDATED);
190
-            exit();
191
-        }
192
-        break;
169
+	case 'delete':
170
+		if (!isset($_POST['ok'])) {
171
+			xoops_cp_header();
172
+			$adminObject = \Xmf\Module\Admin::getInstance();
173
+			$adminObject->displayNavigation(basename(__FILE__));
174
+			echo '<h4>' . _AM_MYIFRAME_CONFIG . '</h4>';
175
+			xoops_confirm(array(
176
+							  'op'      => 'delete',
177
+							  'frameid' => (int)$_GET['frameid'],
178
+							  'ok'      => 1
179
+						  ), 'manage.php', _AM_MYIFRAME_RUSUREDEL);
180
+			include_once __DIR__ . '/admin_footer.php';
181
+		} else {
182
+			if (empty($_POST['frameid'])) {
183
+				redirect_header('manage.php', 2, _AM_MYIFRAME_ERROR_ADD_INDEX);
184
+				exit();
185
+			}
186
+			$frameid = (int)$_POST['frameid'];
187
+			$critere = new Criteria('frame_frameid', $frameid, '=');
188
+			$iframeHandler->deleteAll($critere);
189
+			redirect_header('manage.php', 1, _AM_MYIFRAME_DBUPDATED);
190
+			exit();
191
+		}
192
+		break;
193 193
 
194
-    case 'verifytoadd':
195
-        if (isset($_POST['submit']) && $_POST['submit'] !== '') {
196
-            if ($_POST['url'] === '') {
197
-                xoops_cp_header();
198
-                $adminObject = \Xmf\Module\Admin::getInstance();
199
-                $adminObject->displayNavigation(basename(__FILE__));
200
-                echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
201
-                echo '<tr><td class="odd">';
202
-                echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
203
-                echo _AM_MYIFRAME_ERROR_ADD_INDEX;
204
-                echo "</td></tr></table>\n";
205
-                include_once __DIR__ . '/admin_footer.php';
206
-                xoops_cp_footer();
207
-                $adminObject = \Xmf\Module\Admin::getInstance();
208
-                $adminObject->displayNavigation(basename(__FILE__));
209
-                exit();
210
-            }
211
-            $frame = $iframeHandler->create(true);
212
-            $frame->setVar('frame_description', $_POST['longdesc']);
213
-            $frame->setVar('frame_width', $_POST['width']);
214
-            $frame->setVar('frame_height', $_POST['height']);
215
-            $frame->setVar('frame_align', $_POST['align']);
216
-            $frame->setVar('frame_frameborder', $_POST['frameborder']);
217
-            $frame->setVar('frame_marginwidth', $_POST['marginwidth']);
218
-            $frame->setVar('frame_marginheight', $_POST['marginheight']);
219
-            $frame->setVar('frame_scrolling', $_POST['scrolling']);
220
-            $frame->setVar('frame_url', $_POST['url']);
221
-            $frame->setVar('frame_created', time());
222
-            $frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
223
-            $res = $iframeHandler->insert($frame);
224
-            if (!$res) {
225
-                redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_ADD_INDEX);
226
-                exit();
227
-            }
228
-            redirect_header('manage.php', 1, _AM_MYIFRAME_ADDED_OK);
229
-        }
230
-        break;
194
+	case 'verifytoadd':
195
+		if (isset($_POST['submit']) && $_POST['submit'] !== '') {
196
+			if ($_POST['url'] === '') {
197
+				xoops_cp_header();
198
+				$adminObject = \Xmf\Module\Admin::getInstance();
199
+				$adminObject->displayNavigation(basename(__FILE__));
200
+				echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
201
+				echo '<tr><td class="odd">';
202
+				echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
203
+				echo _AM_MYIFRAME_ERROR_ADD_INDEX;
204
+				echo "</td></tr></table>\n";
205
+				include_once __DIR__ . '/admin_footer.php';
206
+				xoops_cp_footer();
207
+				$adminObject = \Xmf\Module\Admin::getInstance();
208
+				$adminObject->displayNavigation(basename(__FILE__));
209
+				exit();
210
+			}
211
+			$frame = $iframeHandler->create(true);
212
+			$frame->setVar('frame_description', $_POST['longdesc']);
213
+			$frame->setVar('frame_width', $_POST['width']);
214
+			$frame->setVar('frame_height', $_POST['height']);
215
+			$frame->setVar('frame_align', $_POST['align']);
216
+			$frame->setVar('frame_frameborder', $_POST['frameborder']);
217
+			$frame->setVar('frame_marginwidth', $_POST['marginwidth']);
218
+			$frame->setVar('frame_marginheight', $_POST['marginheight']);
219
+			$frame->setVar('frame_scrolling', $_POST['scrolling']);
220
+			$frame->setVar('frame_url', $_POST['url']);
221
+			$frame->setVar('frame_created', time());
222
+			$frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
223
+			$res = $iframeHandler->insert($frame);
224
+			if (!$res) {
225
+				redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_ADD_INDEX);
226
+				exit();
227
+			}
228
+			redirect_header('manage.php', 1, _AM_MYIFRAME_ADDED_OK);
229
+		}
230
+		break;
231 231
 
232
-    case 'addframe':
233
-        xoops_cp_header();
234
-        $adminObject = \Xmf\Module\Admin::getInstance();
235
-        $adminObject->displayNavigation(basename(__FILE__));
236
-        AddEditForm(0, 'verifytoadd', _AM_MYIFRAME_CONFIG, '', '100%', '', '', '0', '0', '0', 1, '', _AM_MYIFRAME_ADDBUTTON);
237
-        break;
232
+	case 'addframe':
233
+		xoops_cp_header();
234
+		$adminObject = \Xmf\Module\Admin::getInstance();
235
+		$adminObject->displayNavigation(basename(__FILE__));
236
+		AddEditForm(0, 'verifytoadd', _AM_MYIFRAME_CONFIG, '', '100%', '', '', '0', '0', '0', 1, '', _AM_MYIFRAME_ADDBUTTON);
237
+		break;
238 238
 
239
-    case 'default':
240
-    default:
241
-        xoops_cp_header();
242
-        $adminObject = \Xmf\Module\Admin::getInstance();
243
-        $adminObject->displayNavigation(basename(__FILE__));
244
-        echo '<h4>' . _AM_MYIFRAME_CONFIG . "</h4><br />\n";
245
-        echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
246
-        echo "<tr><th align='center'>" . _AM_MYIFRAME_ID . "</th><th align='center'>" . _AM_MYIFRAME_DESC . "</th><th align='center'>" . _AM_MYIFRAME_CREATED . "</th><th align='center'>" . _AM_MYIFRAME_HITS . "</th><th align='center'>"
247
-             . _AM_MYIFRAME_ACTION . "</th></tr>\n";
248
-        $critere = new Criteria('1', '1', '=');
249
-        $critere->setSort('frame_description');
250
-        $frarray = $iframeHandler->getObjects($critere);
251
-        $class   = 'even';
252
-        $baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php';
253
-        if (count($frarray) > 0) {
254
-            foreach ($frarray as $frame) {
255
-                $action_edit   = "<a href='" . $baseurl . '?op=edit&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/edit.png' alt='" . _AM_MYIFRAME_EDIT . "'></a>";
256
-                $action_delete = "<a href='" . $baseurl . '?op=delete&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/delete.png' alt='" . _AM_MYIFRAME_DELETE . "'></a>";
257
-                if (xoops_trim($frame->getVar('frame_description') === '')) {
258
-                    $liendesc = $frame->getVar('frame_url');
259
-                } else {
260
-                    $liendesc = "<a href='" . XOOPS_URL . '/modules/myiframe/index.php?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
261
-                }
262
-                echo "<tr class='" . $class . "'><td align='center'>" . $frame->getVar('frame_frameid') . "</td><td align='center'>" . $liendesc . "</td><td align='center'>" . formatTimestamp($frame->getVar('frame_created'))
263
-                     . "</td><td align='center'>" . $frame->getVar('frame_hits') . "</td><td align='center'>" . $action_edit . '&nbsp;-&nbsp;' . $action_delete . "</td></tr>\n";
264
-                $class = ($class === 'even') ? 'odd' : 'even';
265
-            }
266
-        }
267
-        echo "<tr class='" . $class . "'><td colspan='5' align='center'><form name='faddframe' method='post' action='manage.php'><input type='hidden' name='op' value='addframe'><input type='submit' name='submit' value='" . _AM_MYIFRAME_ADD
268
-             . "'></td></tr>";
269
-        echo '</table>';
270
-        include_once __DIR__ . '/admin_footer.php';
271
-        break;
239
+	case 'default':
240
+	default:
241
+		xoops_cp_header();
242
+		$adminObject = \Xmf\Module\Admin::getInstance();
243
+		$adminObject->displayNavigation(basename(__FILE__));
244
+		echo '<h4>' . _AM_MYIFRAME_CONFIG . "</h4><br />\n";
245
+		echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
246
+		echo "<tr><th align='center'>" . _AM_MYIFRAME_ID . "</th><th align='center'>" . _AM_MYIFRAME_DESC . "</th><th align='center'>" . _AM_MYIFRAME_CREATED . "</th><th align='center'>" . _AM_MYIFRAME_HITS . "</th><th align='center'>"
247
+			 . _AM_MYIFRAME_ACTION . "</th></tr>\n";
248
+		$critere = new Criteria('1', '1', '=');
249
+		$critere->setSort('frame_description');
250
+		$frarray = $iframeHandler->getObjects($critere);
251
+		$class   = 'even';
252
+		$baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php';
253
+		if (count($frarray) > 0) {
254
+			foreach ($frarray as $frame) {
255
+				$action_edit   = "<a href='" . $baseurl . '?op=edit&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/edit.png' alt='" . _AM_MYIFRAME_EDIT . "'></a>";
256
+				$action_delete = "<a href='" . $baseurl . '?op=delete&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/delete.png' alt='" . _AM_MYIFRAME_DELETE . "'></a>";
257
+				if (xoops_trim($frame->getVar('frame_description') === '')) {
258
+					$liendesc = $frame->getVar('frame_url');
259
+				} else {
260
+					$liendesc = "<a href='" . XOOPS_URL . '/modules/myiframe/index.php?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
261
+				}
262
+				echo "<tr class='" . $class . "'><td align='center'>" . $frame->getVar('frame_frameid') . "</td><td align='center'>" . $liendesc . "</td><td align='center'>" . formatTimestamp($frame->getVar('frame_created'))
263
+					 . "</td><td align='center'>" . $frame->getVar('frame_hits') . "</td><td align='center'>" . $action_edit . '&nbsp;-&nbsp;' . $action_delete . "</td></tr>\n";
264
+				$class = ($class === 'even') ? 'odd' : 'even';
265
+			}
266
+		}
267
+		echo "<tr class='" . $class . "'><td colspan='5' align='center'><form name='faddframe' method='post' action='manage.php'><input type='hidden' name='op' value='addframe'><input type='submit' name='submit' value='" . _AM_MYIFRAME_ADD
268
+			 . "'></td></tr>";
269
+		echo '</table>';
270
+		include_once __DIR__ . '/admin_footer.php';
271
+		break;
272 272
 }
273 273
 
274 274
 xoops_cp_footer();
Please login to merge, or discard this patch.
Switch Indentation   +160 added lines, -160 removed lines patch added patch discarded remove patch
@@ -103,172 +103,172 @@
 block discarded – undo
103 103
 }
104 104
 
105 105
 switch ($op) {
106
-    case 'verifybeforeedit':
107
-        if (isset($_POST['submit']) && $_POST['submit'] !== '') {
108
-            if ($_POST['longdesc'] === '') {
109
-                xoops_cp_header();
110
-                $adminObject = \Xmf\Module\Admin::getInstance();
111
-                $adminObject->displayNavigation(basename(__FILE__));
112
-                echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
113
-                echo '<tr><td class="odd">';
114
-                echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
115
-                echo _AM_MYIFRAME_ERROR_ADD_INDEX;
116
-                echo '</td></tr></table>';
117
-                include_once __DIR__ . '/admin_footer.php';
118
-                xoops_cp_footer();
119
-                exit();
120
-            }
106
+    	case 'verifybeforeedit':
107
+        	if (isset($_POST['submit']) && $_POST['submit'] !== '') {
108
+            	if ($_POST['longdesc'] === '') {
109
+                	xoops_cp_header();
110
+                	$adminObject = \Xmf\Module\Admin::getInstance();
111
+                	$adminObject->displayNavigation(basename(__FILE__));
112
+                	echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
113
+                	echo '<tr><td class="odd">';
114
+                	echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
115
+                	echo _AM_MYIFRAME_ERROR_ADD_INDEX;
116
+                	echo '</td></tr></table>';
117
+                	include_once __DIR__ . '/admin_footer.php';
118
+                	xoops_cp_footer();
119
+                	exit();
120
+            	}
121 121
 
122
-            $frameid = $_POST['frameid'];
123
-            $frame   = $iframeHandler->get($frameid);
124
-            $frame->unsetNew();
125
-            $frame->setVar('frame_description', $_POST['longdesc']);
126
-            $frame->setVar('frame_width', $_POST['width']);
127
-            $frame->setVar('frame_height', $_POST['height']);
128
-            $frame->setVar('frame_align', $_POST['align']);
129
-            $frame->setVar('frame_frameborder', $_POST['frameborder']);
130
-            $frame->setVar('frame_marginwidth', $_POST['marginwidth']);
131
-            $frame->setVar('frame_marginheight', $_POST['marginheight']);
132
-            $frame->setVar('frame_scrolling', $_POST['scrolling']);
133
-            $frame->setVar('frame_url', $_POST['url']);
134
-            $frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
135
-            $res = $iframeHandler->insert($frame);
136
-            if (!$res) {
137
-                redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_MODIFY_DB);
138
-                exit();
139
-            }
140
-            redirect_header('manage.php', 1, _AM_MYIFRAME_DBUPDATED);
141
-            exit();
142
-        }
143
-        break;
122
+            	$frameid = $_POST['frameid'];
123
+            	$frame   = $iframeHandler->get($frameid);
124
+            	$frame->unsetNew();
125
+            	$frame->setVar('frame_description', $_POST['longdesc']);
126
+            	$frame->setVar('frame_width', $_POST['width']);
127
+            	$frame->setVar('frame_height', $_POST['height']);
128
+            	$frame->setVar('frame_align', $_POST['align']);
129
+            	$frame->setVar('frame_frameborder', $_POST['frameborder']);
130
+            	$frame->setVar('frame_marginwidth', $_POST['marginwidth']);
131
+            	$frame->setVar('frame_marginheight', $_POST['marginheight']);
132
+            	$frame->setVar('frame_scrolling', $_POST['scrolling']);
133
+            	$frame->setVar('frame_url', $_POST['url']);
134
+            	$frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
135
+            	$res = $iframeHandler->insert($frame);
136
+            	if (!$res) {
137
+                	redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_MODIFY_DB);
138
+                	exit();
139
+            	}
140
+            	redirect_header('manage.php', 1, _AM_MYIFRAME_DBUPDATED);
141
+            	exit();
142
+        	}
143
+        	break;
144 144
 
145
-    case 'edit':
146
-        xoops_cp_header();
147
-        $adminObject = \Xmf\Module\Admin::getInstance();
148
-        $adminObject->displayNavigation(basename(__FILE__));
149
-        if (isset($_GET['frameid'])) {
150
-            $frameid = (int)$_GET['frameid'];
151
-            $frame   = $iframeHandler->get($frameid);
152
-            AddEditForm($frameid, 'verifybeforeedit', _AM_MYIFRAME_CONFIG, $frame->getVar('frame_description', 'e'), $frame->getVar('frame_width', 'e'), $frame->getVar('frame_height', 'e'), $frame->getVar('frame_align', 'e'),
153
-                        $frame->getVar('frame_frameborder', 'e'), $frame->getVar('frame_marginwidth', 'e'), $frame->getVar('frame_marginheight', 'e'), $frame->getVar('frame_scrolling', 'e'), $frame->getVar('frame_url', 'e'), _AM_MYIFRAME_UPDATE);
154
-        } else {
155
-            xoops_cp_header();
156
-            $adminObject = \Xmf\Module\Admin::getInstance();
157
-            $adminObject->displayNavigation(basename(__FILE__));
158
-            echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
159
-            echo '<tr><td class="odd">';
160
-            echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
161
-            echo _AM_MYIFRAME_ERROR_ADD_INDEX;
162
-            echo "</td></tr></table>\n";
163
-            include_once __DIR__ . '/admin_footer.php';
164
-            xoops_cp_footer();
165
-            exit();
166
-        }
167
-        break;
145
+    	case 'edit':
146
+        	xoops_cp_header();
147
+        	$adminObject = \Xmf\Module\Admin::getInstance();
148
+        	$adminObject->displayNavigation(basename(__FILE__));
149
+        	if (isset($_GET['frameid'])) {
150
+            	$frameid = (int)$_GET['frameid'];
151
+            	$frame   = $iframeHandler->get($frameid);
152
+            	AddEditForm($frameid, 'verifybeforeedit', _AM_MYIFRAME_CONFIG, $frame->getVar('frame_description', 'e'), $frame->getVar('frame_width', 'e'), $frame->getVar('frame_height', 'e'), $frame->getVar('frame_align', 'e'),
153
+                        	$frame->getVar('frame_frameborder', 'e'), $frame->getVar('frame_marginwidth', 'e'), $frame->getVar('frame_marginheight', 'e'), $frame->getVar('frame_scrolling', 'e'), $frame->getVar('frame_url', 'e'), _AM_MYIFRAME_UPDATE);
154
+        	} else {
155
+            	xoops_cp_header();
156
+            	$adminObject = \Xmf\Module\Admin::getInstance();
157
+            	$adminObject->displayNavigation(basename(__FILE__));
158
+            	echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
159
+            	echo '<tr><td class="odd">';
160
+            	echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
161
+            	echo _AM_MYIFRAME_ERROR_ADD_INDEX;
162
+            	echo "</td></tr></table>\n";
163
+            	include_once __DIR__ . '/admin_footer.php';
164
+            	xoops_cp_footer();
165
+            	exit();
166
+        	}
167
+        	break;
168 168
 
169
-    case 'delete':
170
-        if (!isset($_POST['ok'])) {
171
-            xoops_cp_header();
172
-            $adminObject = \Xmf\Module\Admin::getInstance();
173
-            $adminObject->displayNavigation(basename(__FILE__));
174
-            echo '<h4>' . _AM_MYIFRAME_CONFIG . '</h4>';
175
-            xoops_confirm(array(
176
-                              'op'      => 'delete',
177
-                              'frameid' => (int)$_GET['frameid'],
178
-                              'ok'      => 1
179
-                          ), 'manage.php', _AM_MYIFRAME_RUSUREDEL);
180
-            include_once __DIR__ . '/admin_footer.php';
181
-        } else {
182
-            if (empty($_POST['frameid'])) {
183
-                redirect_header('manage.php', 2, _AM_MYIFRAME_ERROR_ADD_INDEX);
184
-                exit();
185
-            }
186
-            $frameid = (int)$_POST['frameid'];
187
-            $critere = new Criteria('frame_frameid', $frameid, '=');
188
-            $iframeHandler->deleteAll($critere);
189
-            redirect_header('manage.php', 1, _AM_MYIFRAME_DBUPDATED);
190
-            exit();
191
-        }
192
-        break;
169
+    	case 'delete':
170
+        	if (!isset($_POST['ok'])) {
171
+            	xoops_cp_header();
172
+            	$adminObject = \Xmf\Module\Admin::getInstance();
173
+            	$adminObject->displayNavigation(basename(__FILE__));
174
+            	echo '<h4>' . _AM_MYIFRAME_CONFIG . '</h4>';
175
+            	xoops_confirm(array(
176
+                              	'op'      => 'delete',
177
+                              	'frameid' => (int)$_GET['frameid'],
178
+                              	'ok'      => 1
179
+                          	), 'manage.php', _AM_MYIFRAME_RUSUREDEL);
180
+            	include_once __DIR__ . '/admin_footer.php';
181
+        	} else {
182
+            	if (empty($_POST['frameid'])) {
183
+                	redirect_header('manage.php', 2, _AM_MYIFRAME_ERROR_ADD_INDEX);
184
+                	exit();
185
+            	}
186
+            	$frameid = (int)$_POST['frameid'];
187
+            	$critere = new Criteria('frame_frameid', $frameid, '=');
188
+            	$iframeHandler->deleteAll($critere);
189
+            	redirect_header('manage.php', 1, _AM_MYIFRAME_DBUPDATED);
190
+            	exit();
191
+        	}
192
+        	break;
193 193
 
194
-    case 'verifytoadd':
195
-        if (isset($_POST['submit']) && $_POST['submit'] !== '') {
196
-            if ($_POST['url'] === '') {
197
-                xoops_cp_header();
198
-                $adminObject = \Xmf\Module\Admin::getInstance();
199
-                $adminObject->displayNavigation(basename(__FILE__));
200
-                echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
201
-                echo '<tr><td class="odd">';
202
-                echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
203
-                echo _AM_MYIFRAME_ERROR_ADD_INDEX;
204
-                echo "</td></tr></table>\n";
205
-                include_once __DIR__ . '/admin_footer.php';
206
-                xoops_cp_footer();
207
-                $adminObject = \Xmf\Module\Admin::getInstance();
208
-                $adminObject->displayNavigation(basename(__FILE__));
209
-                exit();
210
-            }
211
-            $frame = $iframeHandler->create(true);
212
-            $frame->setVar('frame_description', $_POST['longdesc']);
213
-            $frame->setVar('frame_width', $_POST['width']);
214
-            $frame->setVar('frame_height', $_POST['height']);
215
-            $frame->setVar('frame_align', $_POST['align']);
216
-            $frame->setVar('frame_frameborder', $_POST['frameborder']);
217
-            $frame->setVar('frame_marginwidth', $_POST['marginwidth']);
218
-            $frame->setVar('frame_marginheight', $_POST['marginheight']);
219
-            $frame->setVar('frame_scrolling', $_POST['scrolling']);
220
-            $frame->setVar('frame_url', $_POST['url']);
221
-            $frame->setVar('frame_created', time());
222
-            $frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
223
-            $res = $iframeHandler->insert($frame);
224
-            if (!$res) {
225
-                redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_ADD_INDEX);
226
-                exit();
227
-            }
228
-            redirect_header('manage.php', 1, _AM_MYIFRAME_ADDED_OK);
229
-        }
230
-        break;
194
+    	case 'verifytoadd':
195
+        	if (isset($_POST['submit']) && $_POST['submit'] !== '') {
196
+            	if ($_POST['url'] === '') {
197
+                	xoops_cp_header();
198
+                	$adminObject = \Xmf\Module\Admin::getInstance();
199
+                	$adminObject->displayNavigation(basename(__FILE__));
200
+                	echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
201
+                	echo '<tr><td class="odd">';
202
+                	echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
203
+                	echo _AM_MYIFRAME_ERROR_ADD_INDEX;
204
+                	echo "</td></tr></table>\n";
205
+                	include_once __DIR__ . '/admin_footer.php';
206
+                	xoops_cp_footer();
207
+                	$adminObject = \Xmf\Module\Admin::getInstance();
208
+                	$adminObject->displayNavigation(basename(__FILE__));
209
+                	exit();
210
+            	}
211
+            	$frame = $iframeHandler->create(true);
212
+            	$frame->setVar('frame_description', $_POST['longdesc']);
213
+            	$frame->setVar('frame_width', $_POST['width']);
214
+            	$frame->setVar('frame_height', $_POST['height']);
215
+            	$frame->setVar('frame_align', $_POST['align']);
216
+            	$frame->setVar('frame_frameborder', $_POST['frameborder']);
217
+            	$frame->setVar('frame_marginwidth', $_POST['marginwidth']);
218
+            	$frame->setVar('frame_marginheight', $_POST['marginheight']);
219
+            	$frame->setVar('frame_scrolling', $_POST['scrolling']);
220
+            	$frame->setVar('frame_url', $_POST['url']);
221
+            	$frame->setVar('frame_created', time());
222
+            	$frame->setVar('frame_uid', $xoopsUser->getVar('uid'));
223
+            	$res = $iframeHandler->insert($frame);
224
+            	if (!$res) {
225
+                	redirect_header('manage.php', 1, _AM_MYIFRAME_ERROR_ADD_INDEX);
226
+                	exit();
227
+            	}
228
+            	redirect_header('manage.php', 1, _AM_MYIFRAME_ADDED_OK);
229
+        	}
230
+        	break;
231 231
 
232
-    case 'addframe':
233
-        xoops_cp_header();
234
-        $adminObject = \Xmf\Module\Admin::getInstance();
235
-        $adminObject->displayNavigation(basename(__FILE__));
236
-        AddEditForm(0, 'verifytoadd', _AM_MYIFRAME_CONFIG, '', '100%', '', '', '0', '0', '0', 1, '', _AM_MYIFRAME_ADDBUTTON);
237
-        break;
232
+    	case 'addframe':
233
+        	xoops_cp_header();
234
+        	$adminObject = \Xmf\Module\Admin::getInstance();
235
+        	$adminObject->displayNavigation(basename(__FILE__));
236
+        	AddEditForm(0, 'verifytoadd', _AM_MYIFRAME_CONFIG, '', '100%', '', '', '0', '0', '0', 1, '', _AM_MYIFRAME_ADDBUTTON);
237
+        	break;
238 238
 
239
-    case 'default':
240
-    default:
241
-        xoops_cp_header();
242
-        $adminObject = \Xmf\Module\Admin::getInstance();
243
-        $adminObject->displayNavigation(basename(__FILE__));
244
-        echo '<h4>' . _AM_MYIFRAME_CONFIG . "</h4><br />\n";
245
-        echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
246
-        echo "<tr><th align='center'>" . _AM_MYIFRAME_ID . "</th><th align='center'>" . _AM_MYIFRAME_DESC . "</th><th align='center'>" . _AM_MYIFRAME_CREATED . "</th><th align='center'>" . _AM_MYIFRAME_HITS . "</th><th align='center'>"
247
-             . _AM_MYIFRAME_ACTION . "</th></tr>\n";
248
-        $critere = new Criteria('1', '1', '=');
249
-        $critere->setSort('frame_description');
250
-        $frarray = $iframeHandler->getObjects($critere);
251
-        $class   = 'even';
252
-        $baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php';
253
-        if (count($frarray) > 0) {
254
-            foreach ($frarray as $frame) {
255
-                $action_edit   = "<a href='" . $baseurl . '?op=edit&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/edit.png' alt='" . _AM_MYIFRAME_EDIT . "'></a>";
256
-                $action_delete = "<a href='" . $baseurl . '?op=delete&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/delete.png' alt='" . _AM_MYIFRAME_DELETE . "'></a>";
257
-                if (xoops_trim($frame->getVar('frame_description') === '')) {
258
-                    $liendesc = $frame->getVar('frame_url');
259
-                } else {
260
-                    $liendesc = "<a href='" . XOOPS_URL . '/modules/myiframe/index.php?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
261
-                }
262
-                echo "<tr class='" . $class . "'><td align='center'>" . $frame->getVar('frame_frameid') . "</td><td align='center'>" . $liendesc . "</td><td align='center'>" . formatTimestamp($frame->getVar('frame_created'))
263
-                     . "</td><td align='center'>" . $frame->getVar('frame_hits') . "</td><td align='center'>" . $action_edit . '&nbsp;-&nbsp;' . $action_delete . "</td></tr>\n";
264
-                $class = ($class === 'even') ? 'odd' : 'even';
265
-            }
266
-        }
267
-        echo "<tr class='" . $class . "'><td colspan='5' align='center'><form name='faddframe' method='post' action='manage.php'><input type='hidden' name='op' value='addframe'><input type='submit' name='submit' value='" . _AM_MYIFRAME_ADD
268
-             . "'></td></tr>";
269
-        echo '</table>';
270
-        include_once __DIR__ . '/admin_footer.php';
271
-        break;
239
+    	case 'default':
240
+    	default:
241
+        	xoops_cp_header();
242
+        	$adminObject = \Xmf\Module\Admin::getInstance();
243
+        	$adminObject->displayNavigation(basename(__FILE__));
244
+        	echo '<h4>' . _AM_MYIFRAME_CONFIG . "</h4><br />\n";
245
+        	echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
246
+        	echo "<tr><th align='center'>" . _AM_MYIFRAME_ID . "</th><th align='center'>" . _AM_MYIFRAME_DESC . "</th><th align='center'>" . _AM_MYIFRAME_CREATED . "</th><th align='center'>" . _AM_MYIFRAME_HITS . "</th><th align='center'>"
247
+             	. _AM_MYIFRAME_ACTION . "</th></tr>\n";
248
+        	$critere = new Criteria('1', '1', '=');
249
+        	$critere->setSort('frame_description');
250
+        	$frarray = $iframeHandler->getObjects($critere);
251
+        	$class   = 'even';
252
+        	$baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php';
253
+        	if (count($frarray) > 0) {
254
+            	foreach ($frarray as $frame) {
255
+                	$action_edit   = "<a href='" . $baseurl . '?op=edit&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/edit.png' alt='" . _AM_MYIFRAME_EDIT . "'></a>";
256
+                	$action_delete = "<a href='" . $baseurl . '?op=delete&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/delete.png' alt='" . _AM_MYIFRAME_DELETE . "'></a>";
257
+                	if (xoops_trim($frame->getVar('frame_description') === '')) {
258
+                    	$liendesc = $frame->getVar('frame_url');
259
+                	} else {
260
+                    	$liendesc = "<a href='" . XOOPS_URL . '/modules/myiframe/index.php?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
261
+                	}
262
+                	echo "<tr class='" . $class . "'><td align='center'>" . $frame->getVar('frame_frameid') . "</td><td align='center'>" . $liendesc . "</td><td align='center'>" . formatTimestamp($frame->getVar('frame_created'))
263
+                     	. "</td><td align='center'>" . $frame->getVar('frame_hits') . "</td><td align='center'>" . $action_edit . '&nbsp;-&nbsp;' . $action_delete . "</td></tr>\n";
264
+                	$class = ($class === 'even') ? 'odd' : 'even';
265
+            	}
266
+        	}
267
+        	echo "<tr class='" . $class . "'><td colspan='5' align='center'><form name='faddframe' method='post' action='manage.php'><input type='hidden' name='op' value='addframe'><input type='submit' name='submit' value='" . _AM_MYIFRAME_ADD
268
+             	. "'></td></tr>";
269
+        	echo '</table>';
270
+        	include_once __DIR__ . '/admin_footer.php';
271
+        	break;
272 272
 }
273 273
 
274 274
 xoops_cp_footer();
Please login to merge, or discard this patch.
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -6,25 +6,25 @@  discard block
 block discarded – undo
6 6
  * ****************************************************************************
7 7
  */
8 8
 
9
-include __DIR__ . '/../../../include/cp_header.php';
10
-include_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php';
9
+include __DIR__.'/../../../include/cp_header.php';
10
+include_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
11 11
 
12 12
 // Verify if the table is up to date
13 13
 if (!myiframe_FieldExists('frame_frameid', $xoopsDB->prefix('myiframe'))) {
14
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `frameid` `frame_frameid` INT( 8 ) NOT NULL AUTO_INCREMENT');
15
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `created` `frame_created` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
16
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `uid` `frame_uid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
17
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `longdesc` `frame_description` VARCHAR( 255 ) NOT NULL');
18
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `width` `frame_width` VARCHAR( 15 ) NOT NULL');
19
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `height` `frame_height` VARCHAR( 15 ) NOT NULL');
20
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `align` `frame_align` SMALLINT( 2 ) NOT NULL DEFAULT '0'");
21
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `frameborder` `frame_frameborder` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
22
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `marginwidth` `frame_marginwidth` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
23
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `marginheight` `frame_marginheight` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
24
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `scrolling` `frame_scrolling` SMALLINT( 1 ) NOT NULL DEFAULT '0'");
25
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . " CHANGE `hits` `frame_hits` INT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
26
-    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('myiframe') . ' CHANGE `url` `frame_url` VARCHAR( 255 ) NOT NULL');
27
-    header('Location : ' . XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=myiframe');
14
+    $result = $xoopsDB->queryF('ALTER TABLE '.$xoopsDB->prefix('myiframe').' CHANGE `frameid` `frame_frameid` INT( 8 ) NOT NULL AUTO_INCREMENT');
15
+    $result = $xoopsDB->queryF('ALTER TABLE '.$xoopsDB->prefix('myiframe')." CHANGE `created` `frame_created` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
16
+    $result = $xoopsDB->queryF('ALTER TABLE '.$xoopsDB->prefix('myiframe')." CHANGE `uid` `frame_uid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
17
+    $result = $xoopsDB->queryF('ALTER TABLE '.$xoopsDB->prefix('myiframe').' CHANGE `longdesc` `frame_description` VARCHAR( 255 ) NOT NULL');
18
+    $result = $xoopsDB->queryF('ALTER TABLE '.$xoopsDB->prefix('myiframe').' CHANGE `width` `frame_width` VARCHAR( 15 ) NOT NULL');
19
+    $result = $xoopsDB->queryF('ALTER TABLE '.$xoopsDB->prefix('myiframe').' CHANGE `height` `frame_height` VARCHAR( 15 ) NOT NULL');
20
+    $result = $xoopsDB->queryF('ALTER TABLE '.$xoopsDB->prefix('myiframe')." CHANGE `align` `frame_align` SMALLINT( 2 ) NOT NULL DEFAULT '0'");
21
+    $result = $xoopsDB->queryF('ALTER TABLE '.$xoopsDB->prefix('myiframe')." CHANGE `frameborder` `frame_frameborder` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
22
+    $result = $xoopsDB->queryF('ALTER TABLE '.$xoopsDB->prefix('myiframe')." CHANGE `marginwidth` `frame_marginwidth` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
23
+    $result = $xoopsDB->queryF('ALTER TABLE '.$xoopsDB->prefix('myiframe')." CHANGE `marginheight` `frame_marginheight` SMALLINT( 3 ) NOT NULL DEFAULT '0'");
24
+    $result = $xoopsDB->queryF('ALTER TABLE '.$xoopsDB->prefix('myiframe')." CHANGE `scrolling` `frame_scrolling` SMALLINT( 1 ) NOT NULL DEFAULT '0'");
25
+    $result = $xoopsDB->queryF('ALTER TABLE '.$xoopsDB->prefix('myiframe')." CHANGE `hits` `frame_hits` INT( 8 ) UNSIGNED NOT NULL DEFAULT '0'");
26
+    $result = $xoopsDB->queryF('ALTER TABLE '.$xoopsDB->prefix('myiframe').' CHANGE `url` `frame_url` VARCHAR( 255 ) NOT NULL');
27
+    header('Location : '.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=update&module=myiframe');
28 28
 }
29 29
 
30 30
 $module_id     = $xoopsModule->getVar('mid');
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
  */
49 49
 function addEditForm($frameid, $Action, $FormTitle, $longdesc, $width, $height, $align, $frameborder, $marginwidth, $marginheight, $scrolling, $url, $LabelSubmitButton)
50 50
 {
51
-    include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
51
+    include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
52 52
     global $xoopsModule;
53 53
 
54
-    $sform = new XoopsThemeForm($FormTitle, 'indexform', XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php');
54
+    $sform = new XoopsThemeForm($FormTitle, 'indexform', XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/admin/manage.php');
55 55
     $sform->addElement(new XoopsFormText(_AM_MYIFRAME_DESC, 'longdesc', 50, 255, $longdesc), false);
56 56
     $sform->addElement(new XoopsFormText(_AM_MYIFRAME_WIDTH, 'width', 10, 15, $width), false);
57 57
     $sform->addElement(new XoopsFormText(_AM_MYIFRAME_HEIGHT, 'height', 10, 15, $height), false);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     $button_tray->addElement($cancel_btn);
90 90
     $sform->addElement($button_tray);
91 91
     $sform->display();
92
-    include_once __DIR__ . '/admin_footer.php';
92
+    include_once __DIR__.'/admin_footer.php';
93 93
 }
94 94
 
95 95
 // ******************************************************************************************************************************************
@@ -111,10 +111,10 @@  discard block
 block discarded – undo
111 111
                 $adminObject->displayNavigation(basename(__FILE__));
112 112
                 echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
113 113
                 echo '<tr><td class="odd">';
114
-                echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
114
+                echo "<a href='manage.php'><h4>"._AM_MYIFRAME_CONFIG.'</h4></a>';
115 115
                 echo _AM_MYIFRAME_ERROR_ADD_INDEX;
116 116
                 echo '</td></tr></table>';
117
-                include_once __DIR__ . '/admin_footer.php';
117
+                include_once __DIR__.'/admin_footer.php';
118 118
                 xoops_cp_footer();
119 119
                 exit();
120 120
             }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $adminObject = \Xmf\Module\Admin::getInstance();
148 148
         $adminObject->displayNavigation(basename(__FILE__));
149 149
         if (isset($_GET['frameid'])) {
150
-            $frameid = (int)$_GET['frameid'];
150
+            $frameid = (int) $_GET['frameid'];
151 151
             $frame   = $iframeHandler->get($frameid);
152 152
             AddEditForm($frameid, 'verifybeforeedit', _AM_MYIFRAME_CONFIG, $frame->getVar('frame_description', 'e'), $frame->getVar('frame_width', 'e'), $frame->getVar('frame_height', 'e'), $frame->getVar('frame_align', 'e'),
153 153
                         $frame->getVar('frame_frameborder', 'e'), $frame->getVar('frame_marginwidth', 'e'), $frame->getVar('frame_marginheight', 'e'), $frame->getVar('frame_scrolling', 'e'), $frame->getVar('frame_url', 'e'), _AM_MYIFRAME_UPDATE);
@@ -157,10 +157,10 @@  discard block
 block discarded – undo
157 157
             $adminObject->displayNavigation(basename(__FILE__));
158 158
             echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
159 159
             echo '<tr><td class="odd">';
160
-            echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
160
+            echo "<a href='manage.php'><h4>"._AM_MYIFRAME_CONFIG.'</h4></a>';
161 161
             echo _AM_MYIFRAME_ERROR_ADD_INDEX;
162 162
             echo "</td></tr></table>\n";
163
-            include_once __DIR__ . '/admin_footer.php';
163
+            include_once __DIR__.'/admin_footer.php';
164 164
             xoops_cp_footer();
165 165
             exit();
166 166
         }
@@ -171,19 +171,19 @@  discard block
 block discarded – undo
171 171
             xoops_cp_header();
172 172
             $adminObject = \Xmf\Module\Admin::getInstance();
173 173
             $adminObject->displayNavigation(basename(__FILE__));
174
-            echo '<h4>' . _AM_MYIFRAME_CONFIG . '</h4>';
174
+            echo '<h4>'._AM_MYIFRAME_CONFIG.'</h4>';
175 175
             xoops_confirm(array(
176 176
                               'op'      => 'delete',
177
-                              'frameid' => (int)$_GET['frameid'],
177
+                              'frameid' => (int) $_GET['frameid'],
178 178
                               'ok'      => 1
179 179
                           ), 'manage.php', _AM_MYIFRAME_RUSUREDEL);
180
-            include_once __DIR__ . '/admin_footer.php';
180
+            include_once __DIR__.'/admin_footer.php';
181 181
         } else {
182 182
             if (empty($_POST['frameid'])) {
183 183
                 redirect_header('manage.php', 2, _AM_MYIFRAME_ERROR_ADD_INDEX);
184 184
                 exit();
185 185
             }
186
-            $frameid = (int)$_POST['frameid'];
186
+            $frameid = (int) $_POST['frameid'];
187 187
             $critere = new Criteria('frame_frameid', $frameid, '=');
188 188
             $iframeHandler->deleteAll($critere);
189 189
             redirect_header('manage.php', 1, _AM_MYIFRAME_DBUPDATED);
@@ -199,10 +199,10 @@  discard block
 block discarded – undo
199 199
                 $adminObject->displayNavigation(basename(__FILE__));
200 200
                 echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
201 201
                 echo '<tr><td class="odd">';
202
-                echo "<a href='manage.php'><h4>" . _AM_MYIFRAME_CONFIG . '</h4></a>';
202
+                echo "<a href='manage.php'><h4>"._AM_MYIFRAME_CONFIG.'</h4></a>';
203 203
                 echo _AM_MYIFRAME_ERROR_ADD_INDEX;
204 204
                 echo "</td></tr></table>\n";
205
-                include_once __DIR__ . '/admin_footer.php';
205
+                include_once __DIR__.'/admin_footer.php';
206 206
                 xoops_cp_footer();
207 207
                 $adminObject = \Xmf\Module\Admin::getInstance();
208 208
                 $adminObject->displayNavigation(basename(__FILE__));
@@ -241,33 +241,33 @@  discard block
 block discarded – undo
241 241
         xoops_cp_header();
242 242
         $adminObject = \Xmf\Module\Admin::getInstance();
243 243
         $adminObject->displayNavigation(basename(__FILE__));
244
-        echo '<h4>' . _AM_MYIFRAME_CONFIG . "</h4><br />\n";
244
+        echo '<h4>'._AM_MYIFRAME_CONFIG."</h4><br />\n";
245 245
         echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
246
-        echo "<tr><th align='center'>" . _AM_MYIFRAME_ID . "</th><th align='center'>" . _AM_MYIFRAME_DESC . "</th><th align='center'>" . _AM_MYIFRAME_CREATED . "</th><th align='center'>" . _AM_MYIFRAME_HITS . "</th><th align='center'>"
247
-             . _AM_MYIFRAME_ACTION . "</th></tr>\n";
246
+        echo "<tr><th align='center'>"._AM_MYIFRAME_ID."</th><th align='center'>"._AM_MYIFRAME_DESC."</th><th align='center'>"._AM_MYIFRAME_CREATED."</th><th align='center'>"._AM_MYIFRAME_HITS."</th><th align='center'>"
247
+             . _AM_MYIFRAME_ACTION."</th></tr>\n";
248 248
         $critere = new Criteria('1', '1', '=');
249 249
         $critere->setSort('frame_description');
250 250
         $frarray = $iframeHandler->getObjects($critere);
251 251
         $class   = 'even';
252
-        $baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/manage.php';
252
+        $baseurl = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/admin/manage.php';
253 253
         if (count($frarray) > 0) {
254 254
             foreach ($frarray as $frame) {
255
-                $action_edit   = "<a href='" . $baseurl . '?op=edit&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/edit.png' alt='" . _AM_MYIFRAME_EDIT . "'></a>";
256
-                $action_delete = "<a href='" . $baseurl . '?op=delete&frameid=' . $frame->getVar('frame_frameid') . "'><img src='../assets/images/delete.png' alt='" . _AM_MYIFRAME_DELETE . "'></a>";
255
+                $action_edit   = "<a href='".$baseurl.'?op=edit&frameid='.$frame->getVar('frame_frameid')."'><img src='../assets/images/edit.png' alt='"._AM_MYIFRAME_EDIT."'></a>";
256
+                $action_delete = "<a href='".$baseurl.'?op=delete&frameid='.$frame->getVar('frame_frameid')."'><img src='../assets/images/delete.png' alt='"._AM_MYIFRAME_DELETE."'></a>";
257 257
                 if (xoops_trim($frame->getVar('frame_description') === '')) {
258 258
                     $liendesc = $frame->getVar('frame_url');
259 259
                 } else {
260
-                    $liendesc = "<a href='" . XOOPS_URL . '/modules/myiframe/index.php?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
260
+                    $liendesc = "<a href='".XOOPS_URL.'/modules/myiframe/index.php?iframeid='.$frame->getVar('frame_frameid')."'>".$frame->getVar('frame_description').'</a>';
261 261
                 }
262
-                echo "<tr class='" . $class . "'><td align='center'>" . $frame->getVar('frame_frameid') . "</td><td align='center'>" . $liendesc . "</td><td align='center'>" . formatTimestamp($frame->getVar('frame_created'))
263
-                     . "</td><td align='center'>" . $frame->getVar('frame_hits') . "</td><td align='center'>" . $action_edit . '&nbsp;-&nbsp;' . $action_delete . "</td></tr>\n";
262
+                echo "<tr class='".$class."'><td align='center'>".$frame->getVar('frame_frameid')."</td><td align='center'>".$liendesc."</td><td align='center'>".formatTimestamp($frame->getVar('frame_created'))
263
+                     . "</td><td align='center'>".$frame->getVar('frame_hits')."</td><td align='center'>".$action_edit.'&nbsp;-&nbsp;'.$action_delete."</td></tr>\n";
264 264
                 $class = ($class === 'even') ? 'odd' : 'even';
265 265
             }
266 266
         }
267
-        echo "<tr class='" . $class . "'><td colspan='5' align='center'><form name='faddframe' method='post' action='manage.php'><input type='hidden' name='op' value='addframe'><input type='submit' name='submit' value='" . _AM_MYIFRAME_ADD
267
+        echo "<tr class='".$class."'><td colspan='5' align='center'><form name='faddframe' method='post' action='manage.php'><input type='hidden' name='op' value='addframe'><input type='submit' name='submit' value='"._AM_MYIFRAME_ADD
268 268
              . "'></td></tr>";
269 269
         echo '</table>';
270
-        include_once __DIR__ . '/admin_footer.php';
270
+        include_once __DIR__.'/admin_footer.php';
271 271
         break;
272 272
 }
273 273
 
Please login to merge, or discard this patch.
admin/admin_footer.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@
 block discarded – undo
20 20
 $pathIcon32      = Xmf\Module\Admin::iconUrl('', 32);
21 21
 
22 22
 echo "<div class='adminfooter'>\n"
23
-     ."  <div style='text-align: center;'>\n"
24
-     ."    <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
25
-     ."  </div>\n"
26
-     .'  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
27
-     .'</div>';
23
+	 ."  <div style='text-align: center;'>\n"
24
+	 ."    <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
25
+	 ."  </div>\n"
26
+	 .'  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
27
+	 .'</div>';
28 28
 
29 29
 xoops_cp_footer();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
  * @author     XOOPS Development Team
18 18
  */
19 19
 
20
-$pathIcon32      = Xmf\Module\Admin::iconUrl('', 32);
20
+$pathIcon32 = Xmf\Module\Admin::iconUrl('', 32);
21 21
 
22 22
 echo "<div class='adminfooter'>\n"
23 23
      ."  <div style='text-align: center;'>\n"
24 24
      ."    <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
25 25
      ."  </div>\n"
26
-     .'  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
26
+     .'  '._AM_MODULEADMIN_ADMIN_FOOTER."\n"
27 27
      .'</div>';
28 28
 
29 29
 xoops_cp_footer();
Please login to merge, or discard this patch.
admin/menu.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@  discard block
 block discarded – undo
6 6
  * ****************************************************************************
7 7
  */
8 8
 if (!isset($moduleDirName)) {
9
-    $moduleDirName = basename(dirname(__DIR__));
9
+	$moduleDirName = basename(dirname(__DIR__));
10 10
 }
11 11
 
12 12
 if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) {
13 13
 } else {
14
-    $moduleHelper = Xmf\Module\Helper::getHelper('system');
14
+	$moduleHelper = Xmf\Module\Helper::getHelper('system');
15 15
 }
16 16
 $adminObject   = \Xmf\Module\Admin::getInstance();
17 17
 $pathIcon32    = \Xmf\Module\Admin::menuIconPath('');
@@ -20,22 +20,22 @@  discard block
 block discarded – undo
20 20
 $moduleHelper->loadLanguage('admin');
21 21
 
22 22
 $adminmenu = array(
23
-    array(
24
-        'title' => _MI_MYIFRAME_NAME,
25
-        'link'  => 'admin/index.php',
26
-        'icon'  => $pathIcon32 . '/home.png'
27
-    ),
23
+	array(
24
+		'title' => _MI_MYIFRAME_NAME,
25
+		'link'  => 'admin/index.php',
26
+		'icon'  => $pathIcon32 . '/home.png'
27
+	),
28 28
 
29
-    array(
30
-        'title' => _MI_MYIFRAME_ADMENU1,
31
-        'link'  => 'admin/manage.php',
32
-        'icon'  => $pathIcon32 . '/manage.png'
33
-    ),
29
+	array(
30
+		'title' => _MI_MYIFRAME_ADMENU1,
31
+		'link'  => 'admin/manage.php',
32
+		'icon'  => $pathIcon32 . '/manage.png'
33
+	),
34 34
 
35
-    // Category
36
-    array(
37
-        'title' => _MI_MYIFRAME_ADMENU2,
38
-        'link'  => 'admin/about.php',
39
-        'icon'  => $pathIcon32 . '/about.png'
40
-    ),
35
+	// Category
36
+	array(
37
+		'title' => _MI_MYIFRAME_ADMENU2,
38
+		'link'  => 'admin/about.php',
39
+		'icon'  => $pathIcon32 . '/about.png'
40
+	),
41 41
 );
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,19 +23,19 @@
 block discarded – undo
23 23
     array(
24 24
         'title' => _MI_MYIFRAME_NAME,
25 25
         'link'  => 'admin/index.php',
26
-        'icon'  => $pathIcon32 . '/home.png'
26
+        'icon'  => $pathIcon32.'/home.png'
27 27
     ),
28 28
 
29 29
     array(
30 30
         'title' => _MI_MYIFRAME_ADMENU1,
31 31
         'link'  => 'admin/manage.php',
32
-        'icon'  => $pathIcon32 . '/manage.png'
32
+        'icon'  => $pathIcon32.'/manage.png'
33 33
     ),
34 34
 
35 35
     // Category
36 36
     array(
37 37
         'title' => _MI_MYIFRAME_ADMENU2,
38 38
         'link'  => 'admin/about.php',
39
-        'icon'  => $pathIcon32 . '/about.png'
39
+        'icon'  => $pathIcon32.'/about.png'
40 40
     ),
41 41
 );
Please login to merge, or discard this patch.
admin/about.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@
 block discarded – undo
9 9
 #  Licence : GPL 							#
10 10
 #######################################################
11 11
 
12
-require_once __DIR__ . '/admin_header.php';
12
+require_once __DIR__.'/admin_header.php';
13 13
 xoops_cp_header();
14 14
 $adminObject = \Xmf\Module\Admin::getInstance();
15 15
 $adminObject->displayNavigation(basename(__FILE__));
16 16
 \Xmf\Module\Admin::setPaypal('[email protected]');
17 17
 $adminObject->displayAbout(false);
18 18
 
19
-require_once __DIR__ . '/admin_footer.php';
19
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
  * @version             $Id: blocks_mytype.php 2017-06-06
11 11
  **/
12 12
 
13
-include_once __DIR__ . '/admin_header.php';
13
+include_once __DIR__.'/admin_header.php';
14 14
 xoops_cp_header();
15 15
 $adminObject = \Xmf\Module\Admin::getInstance();
16 16
 $adminObject->displayNavigation(basename(__FILE__));
17 17
 $adminObject->displayIndex();
18 18
 
19
-include_once __DIR__ . '/admin_footer.php';
19
+include_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.