@@ -142,15 +142,15 @@ |
||
142 | 142 | } |
143 | 143 | |
144 | 144 | switch ($op) { |
145 | - case 'main': |
|
146 | - pedigree_config_main(); |
|
147 | - break; |
|
148 | - case 'config': |
|
149 | - pedigree_config_post(); |
|
150 | - break; |
|
151 | - default: |
|
152 | - //xoops_cp_header(); |
|
153 | - /* @todo: move hard coded language string to language file */ |
|
154 | - print "<h1>Unknown method requested ('{$op}')</h1>"; |
|
155 | - xoops_cp_footer(); |
|
145 | + case 'main': |
|
146 | + pedigree_config_main(); |
|
147 | + break; |
|
148 | + case 'config': |
|
149 | + pedigree_config_post(); |
|
150 | + break; |
|
151 | + default: |
|
152 | + //xoops_cp_header(); |
|
153 | + /* @todo: move hard coded language string to language file */ |
|
154 | + print "<h1>Unknown method requested ('{$op}')</h1>"; |
|
155 | + xoops_cp_footer(); |
|
156 | 156 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | //To be deleted? |
35 | 35 | |
36 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
36 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
37 | 37 | //require_once(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/include/pedigree_includes.php"); |
38 | 38 | //require_once dirname(__DIR__) . "/include/pedigree_includes.php"; |
39 | 39 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | print " |
57 | 57 | <form action='config.php' method='POST' enctype='application/x-www-form-urlencoded'>\n |
58 | 58 | <table border='1' cellpadding='0' cellspacing='0' width='100%'>\n |
59 | - <tr><th>" . _AM_PEDIGREE_CTITLE . "</th></tr>\n |
|
59 | + <tr><th>" . _AM_PEDIGREE_CTITLE."</th></tr>\n |
|
60 | 60 | <tr>\n |
61 | 61 | <td class='bg2'>\n |
62 | 62 | <table width='100%' border='0' cellpadding='4' cellspacing='1'>\n"; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | if ('config_id' === $field) { |
66 | 66 | continue; |
67 | 67 | } |
68 | - $pname = 'param_' . $field; |
|
68 | + $pname = 'param_'.$field; |
|
69 | 69 | print " |
70 | 70 | <tr nowrap='nowrap'>\n |
71 | 71 | <td class ='head'>{$prompt}</td>\n |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | <td class='even'>\n |
80 | 80 | <input type='hidden' name='op' value='config'>\n |
81 | 81 | <input type='hidden' name='window' value='config'>\n |
82 | - <input type='submit' value='" . _AM_PEDIGREE_BUT_GO . "'>\n |
|
82 | + <input type='submit' value='" . _AM_PEDIGREE_BUT_GO."'>\n |
|
83 | 83 | </td></tr>\n |
84 | 84 | </table>\n |
85 | 85 | </td></tr>\n |
@@ -117,21 +117,21 @@ discard block |
||
117 | 117 | { |
118 | 118 | $config_fields = pedigree_get_config_fields(); |
119 | 119 | foreach ($config_fields as $field => $prompt) { |
120 | - $param = 'param_' . $field; |
|
120 | + $param = 'param_'.$field; |
|
121 | 121 | global $$param; |
122 | 122 | } |
123 | 123 | $param_config_id = 1; |
124 | - $sql = 'REPLACE INTO ' . $GLOBALS['xoopsDB']->prefix('pedigree_config') . ' (' . pedigree_to_string($config_fields) . ') VALUES ('; |
|
124 | + $sql = 'REPLACE INTO '.$GLOBALS['xoopsDB']->prefix('pedigree_config').' ('.pedigree_to_string($config_fields).') VALUES ('; |
|
125 | 125 | |
126 | 126 | $first = true; |
127 | 127 | foreach ($config_fields as $field => $prompt) { |
128 | - $param = 'param_' . $field; |
|
128 | + $param = 'param_'.$field; |
|
129 | 129 | if (!$first) { |
130 | 130 | $sql .= ', '; |
131 | 131 | } |
132 | 132 | // Handle a 'feature' of PHP that adds backslashes to HTTP parameters. |
133 | 133 | $param_value = get_magic_quotes_gpc() ? stripslashes($$param) : $$param; |
134 | - $sql .= "'" . $GLOBALS['xoopsDB']->escape($param_value) . "'"; |
|
134 | + $sql .= "'".$GLOBALS['xoopsDB']->escape($param_value)."'"; |
|
135 | 135 | $first = false; |
136 | 136 | } |
137 | 137 | $sql .= ' )'; |
@@ -114,12 +114,12 @@ discard block |
||
114 | 114 | |
115 | 115 | $piePart = $value[1]; |
116 | 116 | if (isset($this->total) && $this->total > 0) { |
117 | - $piePart100 = round($piePart / $this->total * 100, 2); // value in percentage, the rounding and * 100 for extra accuracy for pie w/o gaps |
|
117 | + $piePart100 = round($piePart / $this->total * 100, 2); // value in percentage, the rounding and * 100 for extra accuracy for pie w/o gaps |
|
118 | 118 | } else { |
119 | 119 | $piePart100 = 0; |
120 | 120 | } |
121 | 121 | |
122 | - $piePart360 = $piePart100 * 3.6; // in degrees |
|
122 | + $piePart360 = $piePart100 * 3.6; // in degrees |
|
123 | 123 | |
124 | 124 | $colR = hexdec(substr($value[2], 1, 2)); |
125 | 125 | $colG = hexdec(substr($value[2], 3, 2)); |
@@ -146,11 +146,11 @@ discard block |
||
146 | 146 | foreach ($EQpieData as $i => $value) { |
147 | 147 | $piePart = $value[1]; |
148 | 148 | if (isset($this->total) && $this->total > 0) { |
149 | - $piePart100 = round($piePart / $this->total * 100, 2); // value in percentage, the rounding and * 100 for extra accuracy for pie w/o gaps |
|
149 | + $piePart100 = round($piePart / $this->total * 100, 2); // value in percentage, the rounding and * 100 for extra accuracy for pie w/o gaps |
|
150 | 150 | } else { |
151 | 151 | $piePart100 = 0; |
152 | 152 | } |
153 | - $piePart360 = $piePart100 * 3.6; // in degrees |
|
153 | + $piePart360 = $piePart100 * 3.6; // in degrees |
|
154 | 154 | |
155 | 155 | $colR = hexdec(substr($value[2], 1, 2)); |
156 | 156 | $colG = hexdec(substr($value[2], 3, 2)); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | foreach ($EQpieData as $i => $value) { |
194 | 194 | $piePart = $value[1]; |
195 | 195 | if (isset($this->total) && $this->total > 0) { |
196 | - $piePart100 = round($piePart / $this->total * 100, 2); // value in percentage, the rounding and * 100 for extra accuracy for pie w/o gaps |
|
196 | + $piePart100 = round($piePart / $this->total * 100, 2); // value in percentage, the rounding and * 100 for extra accuracy for pie w/o gaps |
|
197 | 197 | } else { |
198 | 198 | $piePart100 = 0; |
199 | 199 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | imagefilledrectangle($legendImage, 5, $yOffset + 2, 5 + $box_width, $yOffset + $box_height + 2, $PartColor); |
206 | 206 | imagerectangle($legendImage, 5, $yOffset + 2, 5 + $box_width, $yOffset + $box_height + 2, $borderColor); |
207 | 207 | |
208 | - $text = $value[0] . ' ' . $piePart100 . '%'; |
|
208 | + $text = $value[0].' '.$piePart100.'%'; |
|
209 | 209 | imagestring($legendImage, 2, '20', $yOffset, $text, $textColor); |
210 | 210 | $yOffset += 15; |
211 | 211 | } |
@@ -216,8 +216,8 @@ |
||
216 | 216 | */ |
217 | 217 | public function changeLightness($degree = 10) |
218 | 218 | { |
219 | - $color1 =& $this->color1; |
|
220 | - $color2 =& $this->color2; |
|
219 | + $color1 = & $this->color1; |
|
220 | + $color2 = & $this->color2; |
|
221 | 221 | |
222 | 222 | for ($x = 0; $x < 3; ++$x) { |
223 | 223 | if (($color1[$x] + $degree) < 256) { |
@@ -68,107 +68,107 @@ |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | switch ($op) { |
71 | - case 'lang': |
|
72 | - lang(); |
|
73 | - break; |
|
74 | - case 'langsave': |
|
75 | - langsave(); |
|
76 | - break; |
|
77 | - case 'colours': |
|
78 | - colours(); |
|
79 | - break; |
|
80 | - case 'savecolours': |
|
81 | - savecolours(); |
|
82 | - break; |
|
83 | - case 'settings': |
|
84 | - settings(); |
|
85 | - break; |
|
86 | - case 'settingssave': |
|
87 | - settingssave(); |
|
88 | - break; |
|
89 | - case 'pro': |
|
90 | - pro(); |
|
91 | - break; |
|
92 | - case 'userfields': |
|
93 | - userfields($field); |
|
94 | - $uf = true; |
|
95 | - break; |
|
96 | - case 'listuserfields': |
|
97 | - listuserfields(); |
|
98 | - $uf = true; |
|
99 | - break; |
|
100 | - case 'togglelocked': |
|
101 | - togglelocked($field); |
|
102 | - break; |
|
103 | - case 'fieldmove': |
|
104 | - fieldmove($field, $_GET['move']); |
|
105 | - break; |
|
106 | - case 'deluserfield': |
|
107 | - deluserfield($_GET['id']); |
|
108 | - break; |
|
109 | - case 'restoreuserfield': |
|
110 | - restoreuserfield($_GET['id']); |
|
111 | - break; |
|
112 | - case 'editlookup': |
|
113 | - editlookup($_GET['id']); |
|
114 | - break; |
|
115 | - case 'lookupmove': |
|
116 | - lookupmove($field, $_GET['id'], $_GET['move']); |
|
117 | - break; |
|
118 | - case 'dellookupvalue': |
|
119 | - dellookupvalue($field, $_GET['id']); |
|
120 | - break; |
|
121 | - case 'addlookupvalue': |
|
122 | - addlookupvalue($field); |
|
123 | - break; |
|
124 | - case 'editlookupvalue': |
|
125 | - editlookupvalue($field, $_GET['id']); |
|
126 | - break; |
|
127 | - case 'savelookupvalue': |
|
128 | - savelookupvalue($field, $_GET['id']); |
|
129 | - break; |
|
130 | - case 'deleted': |
|
131 | - deleted(); |
|
132 | - break; |
|
133 | - case 'delperm': |
|
134 | - delperm($_GET['id']); |
|
135 | - break; |
|
136 | - case 'delall': |
|
137 | - delall(); |
|
138 | - break; |
|
139 | - case 'restore': |
|
140 | - restore($_GET['id']); |
|
141 | - break; |
|
142 | - case 'database': |
|
143 | - database(); |
|
144 | - $db = true; |
|
145 | - break; |
|
146 | - case 'userq': |
|
147 | - userq(); |
|
148 | - $db = true; |
|
149 | - break; |
|
150 | - case 'userqrun': |
|
151 | - userqrun($_GET['f']); |
|
152 | - $db = true; |
|
153 | - break; |
|
154 | - case 'dbanc': |
|
155 | - database_oa(); |
|
156 | - $db = true; |
|
157 | - break; |
|
158 | - case 'fltypar': |
|
159 | - database_fp(); |
|
160 | - $db = true; |
|
161 | - break; |
|
162 | - case 'credits': |
|
163 | - credits(); |
|
164 | - break; |
|
165 | - case 'index': |
|
166 | - index(); |
|
167 | - break; |
|
168 | - default : |
|
169 | - userfields(); |
|
170 | - $uf = true; |
|
171 | - break; |
|
71 | + case 'lang': |
|
72 | + lang(); |
|
73 | + break; |
|
74 | + case 'langsave': |
|
75 | + langsave(); |
|
76 | + break; |
|
77 | + case 'colours': |
|
78 | + colours(); |
|
79 | + break; |
|
80 | + case 'savecolours': |
|
81 | + savecolours(); |
|
82 | + break; |
|
83 | + case 'settings': |
|
84 | + settings(); |
|
85 | + break; |
|
86 | + case 'settingssave': |
|
87 | + settingssave(); |
|
88 | + break; |
|
89 | + case 'pro': |
|
90 | + pro(); |
|
91 | + break; |
|
92 | + case 'userfields': |
|
93 | + userfields($field); |
|
94 | + $uf = true; |
|
95 | + break; |
|
96 | + case 'listuserfields': |
|
97 | + listuserfields(); |
|
98 | + $uf = true; |
|
99 | + break; |
|
100 | + case 'togglelocked': |
|
101 | + togglelocked($field); |
|
102 | + break; |
|
103 | + case 'fieldmove': |
|
104 | + fieldmove($field, $_GET['move']); |
|
105 | + break; |
|
106 | + case 'deluserfield': |
|
107 | + deluserfield($_GET['id']); |
|
108 | + break; |
|
109 | + case 'restoreuserfield': |
|
110 | + restoreuserfield($_GET['id']); |
|
111 | + break; |
|
112 | + case 'editlookup': |
|
113 | + editlookup($_GET['id']); |
|
114 | + break; |
|
115 | + case 'lookupmove': |
|
116 | + lookupmove($field, $_GET['id'], $_GET['move']); |
|
117 | + break; |
|
118 | + case 'dellookupvalue': |
|
119 | + dellookupvalue($field, $_GET['id']); |
|
120 | + break; |
|
121 | + case 'addlookupvalue': |
|
122 | + addlookupvalue($field); |
|
123 | + break; |
|
124 | + case 'editlookupvalue': |
|
125 | + editlookupvalue($field, $_GET['id']); |
|
126 | + break; |
|
127 | + case 'savelookupvalue': |
|
128 | + savelookupvalue($field, $_GET['id']); |
|
129 | + break; |
|
130 | + case 'deleted': |
|
131 | + deleted(); |
|
132 | + break; |
|
133 | + case 'delperm': |
|
134 | + delperm($_GET['id']); |
|
135 | + break; |
|
136 | + case 'delall': |
|
137 | + delall(); |
|
138 | + break; |
|
139 | + case 'restore': |
|
140 | + restore($_GET['id']); |
|
141 | + break; |
|
142 | + case 'database': |
|
143 | + database(); |
|
144 | + $db = true; |
|
145 | + break; |
|
146 | + case 'userq': |
|
147 | + userq(); |
|
148 | + $db = true; |
|
149 | + break; |
|
150 | + case 'userqrun': |
|
151 | + userqrun($_GET['f']); |
|
152 | + $db = true; |
|
153 | + break; |
|
154 | + case 'dbanc': |
|
155 | + database_oa(); |
|
156 | + $db = true; |
|
157 | + break; |
|
158 | + case 'fltypar': |
|
159 | + database_fp(); |
|
160 | + $db = true; |
|
161 | + break; |
|
162 | + case 'credits': |
|
163 | + credits(); |
|
164 | + break; |
|
165 | + case 'index': |
|
166 | + index(); |
|
167 | + break; |
|
168 | + default : |
|
169 | + userfields(); |
|
170 | + $uf = true; |
|
171 | + break; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | //create tools array |
@@ -395,9 +395,9 @@ discard block |
||
395 | 395 | $form .= "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=up'>" . "<img src='assets/images/up.gif' alt='move field up'></a></td>\n" . "<td> </td>\n"; |
396 | 396 | } else { //other rows |
397 | 397 | $form .= "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=up'>" |
398 | - . "<img src='assets/images/up.gif' alt='move field up'></a></td>\n" |
|
399 | - . "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=down'>\n" |
|
400 | - . "<img src='assets/images/down.gif' alt='move field down'></a></td>\n"; |
|
398 | + . "<img src='assets/images/up.gif' alt='move field up'></a></td>\n" |
|
399 | + . "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=down'>\n" |
|
400 | + . "<img src='assets/images/down.gif' alt='move field down'></a></td>\n"; |
|
401 | 401 | } |
402 | 402 | $form .= "<td><a href='tools.php?op=deluserfield&id={$row['id']}'>" . "<img src='images/delete.png' alt='delete field'></a> " . "<a href='tools.php?op=userfields&field={$row['id']}'>{$row['fieldName']}</a></td>\n"; |
403 | 403 | //can the filed be shown in a list |
@@ -567,33 +567,33 @@ discard block |
||
567 | 567 | $form .= " <tr>\n"; |
568 | 568 | if (0 == $count) { //first row |
569 | 569 | $form .= " <td style='width: 15px;'> </td>\n" |
570 | - . " <td style='width: 15px;'>\n" |
|
571 | - . " <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=down'><img src='assets/images/down.gif'></a>\n" |
|
572 | - . " </td>\n" |
|
573 | - . " <td>\n" |
|
574 | - . " <a href='tools.php?op=dellookupvalue&field={$field}&id={$row['id']}'><img src='images/delete.png'></a>\n" |
|
575 | - . " <a href='tools.php?op=editlookupvalue&field={$field}&id={$row['id']}'>{$row['value']}</a>\n" |
|
576 | - . " </td>\n"; |
|
570 | + . " <td style='width: 15px;'>\n" |
|
571 | + . " <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=down'><img src='assets/images/down.gif'></a>\n" |
|
572 | + . " </td>\n" |
|
573 | + . " <td>\n" |
|
574 | + . " <a href='tools.php?op=dellookupvalue&field={$field}&id={$row['id']}'><img src='images/delete.png'></a>\n" |
|
575 | + . " <a href='tools.php?op=editlookupvalue&field={$field}&id={$row['id']}'>{$row['value']}</a>\n" |
|
576 | + . " </td>\n"; |
|
577 | 577 | } elseif ($count == $numrows - 1) { //last row |
578 | 578 | $form .= " <td>\n" |
579 | - . " <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=up'><img src='assets/images/up.gif'></a>\n" |
|
580 | - . " </td>\n" |
|
581 | - . " <td> </td>\n" |
|
582 | - . " <td>\n" |
|
583 | - . " <a href='tools.php?op=dellookupvalue&field={$field}&id={$row['id']}'><img src='assets/images/delete.png'></a>\n" |
|
584 | - . " <a href='tools.php?op=editlookupvalue&field={$field}&id={$row['id']}'>{$row['value']}</a>\n" |
|
585 | - . " </td>\n"; |
|
579 | + . " <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=up'><img src='assets/images/up.gif'></a>\n" |
|
580 | + . " </td>\n" |
|
581 | + . " <td> </td>\n" |
|
582 | + . " <td>\n" |
|
583 | + . " <a href='tools.php?op=dellookupvalue&field={$field}&id={$row['id']}'><img src='assets/images/delete.png'></a>\n" |
|
584 | + . " <a href='tools.php?op=editlookupvalue&field={$field}&id={$row['id']}'>{$row['value']}</a>\n" |
|
585 | + . " </td>\n"; |
|
586 | 586 | } else { //other rows |
587 | 587 | $form .= " <td>\n" |
588 | - . " <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=up'><img src='assets/images/up.gif'></a>\n" |
|
589 | - . " </td>\n" |
|
590 | - . " <td>\n" |
|
591 | - . " <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=down'><img src='assets/images/down.gif'></a>\n" |
|
592 | - . " </td>\n" |
|
593 | - . " <td>\n" |
|
594 | - . " <a href='tools.php?op=dellookupvalue&field={$field}&id={$row['id']}'><img src='images/delete.png'></a>\n" |
|
595 | - . " <a href='tools.php?op=editlookupvalue&field={$field}&id={$row['id']}'>{$row['value']}</a>\n" |
|
596 | - . " </td>\n"; |
|
588 | + . " <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=up'><img src='assets/images/up.gif'></a>\n" |
|
589 | + . " </td>\n" |
|
590 | + . " <td>\n" |
|
591 | + . " <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=down'><img src='assets/images/down.gif'></a>\n" |
|
592 | + . " </td>\n" |
|
593 | + . " <td>\n" |
|
594 | + . " <a href='tools.php?op=dellookupvalue&field={$field}&id={$row['id']}'><img src='images/delete.png'></a>\n" |
|
595 | + . " <a href='tools.php?op=editlookupvalue&field={$field}&id={$row['id']}'>{$row['value']}</a>\n" |
|
596 | + . " </td>\n"; |
|
597 | 597 | } |
598 | 598 | $form .= "</tr>\n"; |
599 | 599 | ++$count; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | |
26 | 26 | //require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
27 | -require_once __DIR__ . '/header.php'; |
|
27 | +require_once __DIR__.'/header.php'; |
|
28 | 28 | $moduleDirName = basename(__DIR__); |
29 | 29 | xoops_loadLanguage('main', $moduleDirName); |
30 | 30 | $helper = Pedigree\Helper::getInstance(); |
@@ -34,23 +34,23 @@ discard block |
||
34 | 34 | include $GLOBALS['xoops']->path('/header.php'); |
35 | 35 | |
36 | 36 | // Include any common code for this module. |
37 | -require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php'; |
|
37 | +require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php'; |
|
38 | 38 | |
39 | 39 | //check for access |
40 | 40 | $xoopsModule = XoopsModule::getByDirname($moduleDirName); |
41 | 41 | if (empty($GLOBALS['xoopsUser']) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser)) { |
42 | - redirect_header('index.php', 3, _NOPERM . '<br>' . _MA_PEDIGREE_REGIST); |
|
42 | + redirect_header('index.php', 3, _NOPERM.'<br>'._MA_PEDIGREE_REGIST); |
|
43 | 43 | } |
44 | 44 | |
45 | -$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js'); |
|
45 | +$xoTheme->addScript(XOOPS_URL.'/browse.php?Frameworks/jquery/jquery.js'); |
|
46 | 46 | //$xoTheme->addScript(PEDIGREE_URL . '/assets/js/jquery.ThickBox/thickbox-compressed.js'); |
47 | 47 | |
48 | -$xoTheme->addScript(PEDIGREE_URL . '/assets/js/jquery.magnific-popup.min.js'); |
|
49 | -$xoTheme->addScript(PEDIGREE_URL . '/assets/js/colpick.js'); |
|
48 | +$xoTheme->addScript(PEDIGREE_URL.'/assets/js/jquery.magnific-popup.min.js'); |
|
49 | +$xoTheme->addScript(PEDIGREE_URL.'/assets/js/colpick.js'); |
|
50 | 50 | |
51 | -$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/colpick.css'); |
|
52 | -$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/magnific-popup.css'); |
|
53 | -$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/style.css'); |
|
51 | +$xoTheme->addStylesheet(PEDIGREE_URL.'/assets/css/colpick.css'); |
|
52 | +$xoTheme->addStylesheet(PEDIGREE_URL.'/assets/css/magnific-popup.css'); |
|
53 | +$xoTheme->addStylesheet(PEDIGREE_URL.'/assets/css/style.css'); |
|
54 | 54 | |
55 | 55 | global $field; |
56 | 56 | //add JS routines |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $GLOBALS['xoopsTpl']->assign('tools', $tools); |
202 | 202 | |
203 | 203 | //footer |
204 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
204 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
205 | 205 | |
206 | 206 | function index() |
207 | 207 | { |
@@ -260,26 +260,26 @@ discard block |
||
260 | 260 | </script> |
261 | 261 | |
262 | 262 | <?php |
263 | - $form = _MA_PEDIGREE_BGCOLOR . '<br><br>'; |
|
263 | + $form = _MA_PEDIGREE_BGCOLOR.'<br><br>'; |
|
264 | 264 | $form .= '<FORM NAME="myForm" action=\'tools.php?op=savecolours\' method=\'POST\'> |
265 | 265 | <table> |
266 | 266 | |
267 | 267 | <!-- |
268 | - <tr><td>' . _MA_PEDIGREE_TXT_COLOR . '</td><td><INPUT TYPE="text" id="text" name="text" value="' . $text . '" size="11" maxlength="7"> |
|
268 | + <tr><td>' . _MA_PEDIGREE_TXT_COLOR.'</td><td><INPUT TYPE="text" id="text" name="text" value="'.$text.'" size="11" maxlength="7"> |
|
269 | 269 | <a href="TCP.popup(document.forms[\'myForm\'].elements[\'text\'])"> |
270 | 270 | <img width="15" height="13" border="0" alt="Click Here to Pick up the color" src="assets/images/sel.gif"></a></td></tr> |
271 | 271 | |
272 | 272 | |
273 | - <tr><td>' . _MA_PEDIGREE_LINK_COLOR . '</td><td><INPUT TYPE="text" id="actlink" name="actlink" value="' . $actlink . '" size="11" maxlength="7"> |
|
273 | + <tr><td>' . _MA_PEDIGREE_LINK_COLOR.'</td><td><INPUT TYPE="text" id="actlink" name="actlink" value="'.$actlink.'" size="11" maxlength="7"> |
|
274 | 274 | <a href="TCP.popup(document.forms[\'myForm\'].elements[\'actlink\'])"> |
275 | 275 | <img width="15" height="13" border="0" alt="Click Here to Pick up the color" src="assets/images/sel.gif"></a></td></tr> |
276 | 276 | |
277 | 277 | |
278 | - <tr><td>' . _MA_PEDIGREE_BACK1_COLOR . '</td><td><INPUT TYPE="text" id="even" name="even" value="' . $even . '" size="11" maxlength="7"> |
|
278 | + <tr><td>' . _MA_PEDIGREE_BACK1_COLOR.'</td><td><INPUT TYPE="text" id="even" name="even" value="'.$even.'" size="11" maxlength="7"> |
|
279 | 279 | <a href="TCP.popup(document.forms[\'myForm\'].elements[\'even\'])"> |
280 | 280 | <img width="15" height="13" border="0" alt="Click Here to Pick up the color" src="assets/images/sel.gif"></a></td></tr> |
281 | 281 | |
282 | - <tr><td>' . _MA_PEDIGREE_BACK2_COLOR . '</td><td><INPUT TYPE="text" id="body" name="body" value="' . $body . '" size="11" maxlength="7"> |
|
282 | + <tr><td>' . _MA_PEDIGREE_BACK2_COLOR.'</td><td><INPUT TYPE="text" id="body" name="body" value="'.$body.'" size="11" maxlength="7"> |
|
283 | 283 | <a href="TCP.popup(document.forms[\'myForm\'].elements[\'body\'])"> |
284 | 284 | <img width="15" height="13" border="0" alt="Click Here to Pick up the color" src="assets/images/sel.gif"></a></td></tr> |
285 | 285 | |
@@ -287,36 +287,36 @@ discard block |
||
287 | 287 | |
288 | 288 | <!-- |
289 | 289 | |
290 | - <tr><td>' . _MA_PEDIGREE_TXT_COLOR . '</td><td>#<input type="text" id="picker" name="text" value="' . $text . '" size="11" maxlength="7"> |
|
290 | + <tr><td>' . _MA_PEDIGREE_TXT_COLOR.'</td><td>#<input type="text" id="picker" name="text" value="'.$text.'" size="11" maxlength="7"> |
|
291 | 291 | </td></tr> |
292 | 292 | |
293 | - <tr><td>' . _MA_PEDIGREE_LINK_COLOR . '</td><td>#<input type="text" id="picker" name="actlink" value="' . $actlink . '" size="11" maxlength="7"> |
|
293 | + <tr><td>' . _MA_PEDIGREE_LINK_COLOR.'</td><td>#<input type="text" id="picker" name="actlink" value="'.$actlink.'" size="11" maxlength="7"> |
|
294 | 294 | </td></tr> |
295 | 295 | |
296 | - <tr><td>' . _MA_PEDIGREE_BACK1_COLOR . '</td><td>#<input type="text" id="picker" name="even" value="' . $even . '" size="11" maxlength="7"> |
|
296 | + <tr><td>' . _MA_PEDIGREE_BACK1_COLOR.'</td><td>#<input type="text" id="picker" name="even" value="'.$even.'" size="11" maxlength="7"> |
|
297 | 297 | </td></tr> |
298 | 298 | |
299 | - <tr><td>' . _MA_PEDIGREE_BACK2_COLOR . '</td><td>#<input type="text" id="picker" name="body" value="' . $body . '" size="11" maxlength="7"> |
|
299 | + <tr><td>' . _MA_PEDIGREE_BACK2_COLOR.'</td><td>#<input type="text" id="picker" name="body" value="'.$body.'" size="11" maxlength="7"> |
|
300 | 300 | </td></tr> |
301 | 301 | |
302 | 302 | --> |
303 | 303 | |
304 | -<tr><td>' . _MA_PEDIGREE_TXT_COLOR . '</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="text" maxlength="7" size="7" id="colorpickerField1" value="' . $text . '"> |
|
304 | +<tr><td>' . _MA_PEDIGREE_TXT_COLOR.'</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="text" maxlength="7" size="7" id="colorpickerField1" value="'.$text.'"> |
|
305 | 305 | </td></tr> |
306 | 306 | |
307 | 307 | |
308 | -<tr><td>' . _MA_PEDIGREE_LINK_COLOR . '</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="actlink" maxlength="7" size="7" id="colorpickerField1" value="' . $actlink . '"> |
|
308 | +<tr><td>' . _MA_PEDIGREE_LINK_COLOR.'</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="actlink" maxlength="7" size="7" id="colorpickerField1" value="'.$actlink.'"> |
|
309 | 309 | </td></tr> |
310 | 310 | |
311 | 311 | |
312 | -<tr><td>' . _MA_PEDIGREE_BACK1_COLOR . '</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="even" maxlength="7" size="7" id="colorpickerField1" value="' . $even . '"> |
|
312 | +<tr><td>' . _MA_PEDIGREE_BACK1_COLOR.'</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="even" maxlength="7" size="7" id="colorpickerField1" value="'.$even.'"> |
|
313 | 313 | </td></tr> |
314 | 314 | |
315 | 315 | |
316 | -<tr><td>' . _MA_PEDIGREE_BACK2_COLOR . '</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="body" maxlength="7" size="7" id="colorpickerField1" value="' . $body . '"> |
|
316 | +<tr><td>' . _MA_PEDIGREE_BACK2_COLOR.'</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="body" maxlength="7" size="7" id="colorpickerField1" value="'.$body.'"> |
|
317 | 317 | </td></tr> |
318 | 318 | |
319 | - <tr><td><INPUT TYPE="submit" value="' . _MA_PEDIGREE_SUBMIT_BUTTON . '"></td><td> </td></tr> |
|
319 | + <tr><td><INPUT TYPE="submit" value="' . _MA_PEDIGREE_SUBMIT_BUTTON.'"></td><td> </td></tr> |
|
320 | 320 | |
321 | 321 | </table> |
322 | 322 | |
@@ -338,8 +338,8 @@ discard block |
||
338 | 338 | { |
339 | 339 | $color = new \XoopsModules\Pedigree\ImageColor(); |
340 | 340 | //create darker link hover colour |
341 | - $actLink = Request::getString('actlink', '', 'POST'); //active link color in hex |
|
342 | - $even = Request::getString('even', '', 'POST'); // even color in hex |
|
341 | + $actLink = Request::getString('actlink', '', 'POST'); //active link color in hex |
|
342 | + $even = Request::getString('even', '', 'POST'); // even color in hex |
|
343 | 343 | $text = Request::getString('text', '', 'POST'); |
344 | 344 | $body = Request::getString('body', '', 'POST'); |
345 | 345 | |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | $col = "{$actLink};{$even};#{$female};{$text};#{$dark};#{$head};{$body};{$actLink}"; |
359 | 359 | |
360 | 360 | // $query = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('config') . " SET conf_value = '{$col}' WHERE conf_name = 'colourscheme'"; |
361 | - $query = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('config') . " SET conf_value = '" . $GLOBALS['xoopsDB']->escape($col) . "' WHERE conf_name = 'colourscheme'"; |
|
361 | + $query = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('config')." SET conf_value = '".$GLOBALS['xoopsDB']->escape($col)."' WHERE conf_name = 'colourscheme'"; |
|
362 | 362 | $GLOBALS['xoopsDB']->query($query); |
363 | 363 | redirect_header('tools.php?op=colours', 1, 'Your settings have been saved.'); |
364 | 364 | } |
@@ -373,12 +373,12 @@ discard block |
||
373 | 373 | { |
374 | 374 | global $form; |
375 | 375 | $form .= _MA_PEDIGREE_FIELD_EXPLAIN4; |
376 | - $sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " WHERE isActive = '1' ORDER BY `order`"; |
|
376 | + $sql = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." WHERE isActive = '1' ORDER BY `order`"; |
|
377 | 377 | $result = $GLOBALS['xoopsDB']->query($sql); |
378 | 378 | $numrows = $GLOBALS['xoopsDB']->getRowsNum($result); |
379 | 379 | $count = 0; |
380 | 380 | $form .= _MA_PEDIGREE_FIELD_FORM1; |
381 | - $form .= "<tr ><td colspan='7'><hr></td></tr>"; |
|
381 | + $form .= "<tr ><td colspan='7'><hr></td></tr>"; |
|
382 | 382 | $mark = "<td><span style='font-weight: bold;'>X</span></td>\n"; |
383 | 383 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
384 | 384 | $form .= "<tr>\n"; |
@@ -390,16 +390,16 @@ discard block |
||
390 | 390 | } |
391 | 391 | |
392 | 392 | if (0 == $count) { //first row |
393 | - $form .= "<td style='width: 15px;'> </td><td style='width: 15px;'><a href='tools.php?op=fieldmove&field={$row['id']}&move=down'>" . "<img src='assets/images/down.gif' alt='move field down'></a></td>\n"; |
|
393 | + $form .= "<td style='width: 15px;'> </td><td style='width: 15px;'><a href='tools.php?op=fieldmove&field={$row['id']}&move=down'>"."<img src='assets/images/down.gif' alt='move field down'></a></td>\n"; |
|
394 | 394 | } elseif ($count == $numrows - 1) { //last row |
395 | - $form .= "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=up'>" . "<img src='assets/images/up.gif' alt='move field up'></a></td>\n" . "<td> </td>\n"; |
|
395 | + $form .= "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=up'>"."<img src='assets/images/up.gif' alt='move field up'></a></td>\n"."<td> </td>\n"; |
|
396 | 396 | } else { //other rows |
397 | 397 | $form .= "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=up'>" |
398 | 398 | . "<img src='assets/images/up.gif' alt='move field up'></a></td>\n" |
399 | 399 | . "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=down'>\n" |
400 | 400 | . "<img src='assets/images/down.gif' alt='move field down'></a></td>\n"; |
401 | 401 | } |
402 | - $form .= "<td><a href='tools.php?op=deluserfield&id={$row['id']}'>" . "<img src='images/delete.png' alt='delete field'></a> " . "<a href='tools.php?op=userfields&field={$row['id']}'>{$row['fieldName']}</a></td>\n"; |
|
402 | + $form .= "<td><a href='tools.php?op=deluserfield&id={$row['id']}'>"."<img src='images/delete.png' alt='delete field'></a> "."<a href='tools.php?op=userfields&field={$row['id']}'>{$row['fieldName']}</a></td>\n"; |
|
403 | 403 | //can the filed be shown in a list |
404 | 404 | if (1 == $row['ViewInList']) { |
405 | 405 | $form .= $mark; |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | } |
415 | 415 | //has lookuptable ? |
416 | 416 | if (1 == $row['LookupTable']) { |
417 | - $form .= "<td><a href='tools.php?op=editlookup&id={$row['id']}'>" . _EDIT . "</a></td>\n"; |
|
417 | + $form .= "<td><a href='tools.php?op=editlookup&id={$row['id']}'>"._EDIT."</a></td>\n"; |
|
418 | 418 | } else { |
419 | 419 | $form .= "<td> </td>\n"; |
420 | 420 | } |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | ++$count; |
424 | 424 | } |
425 | 425 | $form .= "</table>\n"; |
426 | - $sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " WHERE isActive = '0' ORDER BY 'id'"; |
|
426 | + $sql = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." WHERE isActive = '0' ORDER BY 'id'"; |
|
427 | 427 | $result = $GLOBALS['xoopsDB']->query($sql); |
428 | 428 | if ($GLOBALS['xoopsDB']->getRowsNum($result) > 0) { |
429 | 429 | $form .= _MA_PEDIGREE_FIELD_EXPLAIN5; |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | function togglelocked($id) |
446 | 446 | { |
447 | 447 | //find current status |
448 | - $sql = 'SELECT locked FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " WHERE id = '{$id}'"; |
|
448 | + $sql = 'SELECT locked FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." WHERE id = '{$id}'"; |
|
449 | 449 | $result = $GLOBALS['xoopsDB']->query($sql); |
450 | 450 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
451 | 451 | if (0 == $row['locked']) { //not locked |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | function lock($id) |
466 | 466 | { |
467 | 467 | $id = (int)$id; |
468 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET locked = '1' WHERE id = '{$id}'"; |
|
468 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET locked = '1' WHERE id = '{$id}'"; |
|
469 | 469 | $GLOBALS['xoopsDB']->queryF($sql); |
470 | 470 | } |
471 | 471 | |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | function unlock($id) |
476 | 476 | { |
477 | 477 | $id = (int)$id; |
478 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET locked = '0' WHERE id = '{$id}'"; |
|
478 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET locked = '0' WHERE id = '{$id}'"; |
|
479 | 479 | $GLOBALS['xoopsDB']->queryF($sql); |
480 | 480 | } |
481 | 481 | |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | function fieldmove($field, $move) |
492 | 492 | { |
493 | 493 | //find next id |
494 | - $sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " WHERE isActive = '1' ORDER BY `order`"; |
|
494 | + $sql = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." WHERE isActive = '1' ORDER BY `order`"; |
|
495 | 495 | $result = $GLOBALS['xoopsDB']->query($sql); |
496 | 496 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
497 | 497 | $valorder[] = $row['order']; |
@@ -513,12 +513,12 @@ discard block |
||
513 | 513 | $nextorder = $valorder[$x - 1]; |
514 | 514 | } |
515 | 515 | //move value with ID=nextid to original location |
516 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET `order` = '127' WHERE `order` = '{$nextorder}'"; |
|
516 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET `order` = '127' WHERE `order` = '{$nextorder}'"; |
|
517 | 517 | $GLOBALS['xoopsDB']->queryF($sql); |
518 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET `order` = '{$nextorder}' WHERE `order` = '{$currentorder}'"; |
|
518 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET `order` = '{$nextorder}' WHERE `order` = '{$currentorder}'"; |
|
519 | 519 | $GLOBALS['xoopsDB']->queryF($sql); |
520 | 520 | //move current value into nextvalue's spot |
521 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET `order` = '{$currentorder}' WHERE `order` = '127'"; |
|
521 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET `order` = '{$currentorder}' WHERE `order` = '127'"; |
|
522 | 522 | $GLOBALS['xoopsDB']->queryF($sql); |
523 | 523 | listuserfields(); |
524 | 524 | } |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | function deluserfield($id) |
532 | 532 | { |
533 | 533 | $id = (int)$id; |
534 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET isActive = '0' WHERE id = {$id}"; |
|
534 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET isActive = '0' WHERE id = {$id}"; |
|
535 | 535 | $GLOBALS['xoopsDB']->queryF($sql); |
536 | 536 | listuserfields(); |
537 | 537 | } |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | function restoreuserfield($id) |
546 | 546 | { |
547 | 547 | $id = (int)$id; |
548 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET isActive = '1' WHERE id = {$id}"; |
|
548 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET isActive = '1' WHERE id = {$id}"; |
|
549 | 549 | $GLOBALS['xoopsDB']->queryF($sql); |
550 | 550 | listuserfields(); |
551 | 551 | } |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | function editlookup($field) |
559 | 559 | { |
560 | 560 | $form = _MA_PEDIGREE_LOOKUPFIELD; |
561 | - $sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . ' ORDER BY `order`'; |
|
561 | + $sql = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field).' ORDER BY `order`'; |
|
562 | 562 | $result = $GLOBALS['xoopsDB']->query($sql); |
563 | 563 | $numrows = $GLOBALS['xoopsDB']->getRowsNum($result); |
564 | 564 | $count = 0; |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | $form .= "</tr>\n"; |
599 | 599 | ++$count; |
600 | 600 | } |
601 | - $form .= "</table>\n" . "<form method='post' action='tools.php?op=addlookupvalue&field={$field}'>\n" . "<input type='text' name='value' style='width: 140px;'> \n" . "<input type='submit' value='Add value'>\n" . _MA_PEDIGREE_DELVALUE . "\n"; |
|
601 | + $form .= "</table>\n"."<form method='post' action='tools.php?op=addlookupvalue&field={$field}'>\n"."<input type='text' name='value' style='width: 140px;'> \n"."<input type='submit' value='Add value'>\n"._MA_PEDIGREE_DELVALUE."\n"; |
|
602 | 602 | // $form .= '<br><br><input type="submit" name="reset" value=Exit> '; |
603 | 603 | $GLOBALS['xoopsTpl']->assign('form', $form); |
604 | 604 | } |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | function lookupmove($field, $id, $move) |
612 | 612 | { |
613 | 613 | //find next id |
614 | - $sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . ' ORDER BY `order`'; |
|
614 | + $sql = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field).' ORDER BY `order`'; |
|
615 | 615 | $result = $GLOBALS['xoopsDB']->query($sql); |
616 | 616 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
617 | 617 | $values[] = ['id' => $row['id'], 'content' => $row['value'], 'orderof' => $row['order']]; |
@@ -637,9 +637,9 @@ discard block |
||
637 | 637 | $nextid = $values[$arraylocation - 1]['id']; |
638 | 638 | $nextorder = $values[$arraylocation - 1]['orderof']; |
639 | 639 | } |
640 | - $sql = 'UPDATE `draaf_pedigree_lookup' . $field . "` SET `order` = '" . $nextorder . "' WHERE `id` = '" . $id . "'"; |
|
640 | + $sql = 'UPDATE `draaf_pedigree_lookup'.$field."` SET `order` = '".$nextorder."' WHERE `id` = '".$id."'"; |
|
641 | 641 | $GLOBALS['xoopsDB']->queryF($sql); |
642 | - $sql = 'UPDATE `draaf_pedigree_lookup' . $field . "` SET `order` = '" . $currentorder . "' WHERE `id` = '" . $nextid . "'"; |
|
642 | + $sql = 'UPDATE `draaf_pedigree_lookup'.$field."` SET `order` = '".$currentorder."' WHERE `id` = '".$nextid."'"; |
|
643 | 643 | $GLOBALS['xoopsDB']->queryF($sql); |
644 | 644 | editlookup($field); |
645 | 645 | } |
@@ -654,10 +654,10 @@ discard block |
||
654 | 654 | */ |
655 | 655 | function editlookupvalue($field, $id) |
656 | 656 | { |
657 | - $sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . ' WHERE id =' . $id; |
|
657 | + $sql = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field).' WHERE id ='.$id; |
|
658 | 658 | $result = $GLOBALS['xoopsDB']->query($sql); |
659 | 659 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
660 | - $form = "<form method='post' action='tools.php?op=savelookupvalue&field={$field}&id={$id}'>" . "<input type='text' name='value' value='{$row['value']}' style='width: 140px;'> " . "<input type='submit' value='Save value'>\n"; |
|
660 | + $form = "<form method='post' action='tools.php?op=savelookupvalue&field={$field}&id={$id}'>"."<input type='text' name='value' value='{$row['value']}' style='width: 140px;'> "."<input type='submit' value='Save value'>\n"; |
|
661 | 661 | } |
662 | 662 | $GLOBALS['xoopsTpl']->assign('form', $form); |
663 | 663 | } |
@@ -671,9 +671,9 @@ discard block |
||
671 | 671 | */ |
672 | 672 | function savelookupvalue($field, $id) |
673 | 673 | { |
674 | - $id = (int)$id; //sanitize id |
|
674 | + $id = (int)$id; //sanitize id |
|
675 | 675 | $value = Request::getString('value', '', 'POST'); |
676 | - $SQL = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . " SET value = '{$value}' WHERE id = {$id}"; |
|
676 | + $SQL = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field)." SET value = '{$value}' WHERE id = {$id}"; |
|
677 | 677 | $GLOBALS['xoopsDB']->queryF($SQL); |
678 | 678 | redirect_header("tools.php?op=editlookup&id={$field}", 2, 'The value has been saved.'); |
679 | 679 | } |
@@ -692,16 +692,16 @@ discard block |
||
692 | 692 | // $default = $fieldObject->defaultvalue; |
693 | 693 | $default = $GLOBALS['xoopsDB']->escape($fieldObject->defaultvalue); |
694 | 694 | if ($default == $id) { |
695 | - redirect_header('tools.php?op=editlookup&id=' . $field, 3, _MA_PEDIGREE_NO_DELETE . $fieldObject->fieldname); |
|
695 | + redirect_header('tools.php?op=editlookup&id='.$field, 3, _MA_PEDIGREE_NO_DELETE.$fieldObject->fieldname); |
|
696 | 696 | } |
697 | - $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . ' WHERE id = ' . $id; |
|
697 | + $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field).' WHERE id = '.$id; |
|
698 | 698 | $GLOBALS['xoopsDB']->queryF($sql); |
699 | 699 | //change current values to default for deleted value |
700 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' SET user' . $field . " = '" . $default . "' WHERE user" . $field . " = '" . $id . "'"; |
|
700 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' SET user'.$field." = '".$default."' WHERE user".$field." = '".$id."'"; |
|
701 | 701 | $GLOBALS['xoopsDB']->queryF($sql); |
702 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_temp') . ' SET user' . $field . " = '" . $default . "' WHERE user" . $field . " = '" . $id . "'"; |
|
702 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_temp').' SET user'.$field." = '".$default."' WHERE user".$field." = '".$id."'"; |
|
703 | 703 | $GLOBALS['xoopsDB']->queryF($sql); |
704 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash') . ' SET user' . $field . " = '" . $default . "' WHERE user" . $field . " = '" . $id . "'"; |
|
704 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_trash').' SET user'.$field." = '".$default."' WHERE user".$field." = '".$id."'"; |
|
705 | 705 | $GLOBALS['xoopsDB']->queryF($sql); |
706 | 706 | editlookup($field); |
707 | 707 | } |
@@ -711,15 +711,15 @@ discard block |
||
711 | 711 | */ |
712 | 712 | function addlookupvalue($field) |
713 | 713 | { |
714 | - $SQL = 'SELECT id FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . ' ORDER BY id DESC LIMIT 1'; |
|
714 | + $SQL = 'SELECT id FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field).' ORDER BY id DESC LIMIT 1'; |
|
715 | 715 | $result = $GLOBALS['xoopsDB']->query($SQL); |
716 | 716 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
717 | 717 | $count = $row['id']; |
718 | 718 | ++$count; |
719 | - $sql = 'INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . " VALUES ('" . $count . "', '" . $_POST['value'] . "', '" . $count . "')"; |
|
719 | + $sql = 'INSERT INTO '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field)." VALUES ('".$count."', '".$_POST['value']."', '".$count."')"; |
|
720 | 720 | $GLOBALS['xoopsDB']->queryF($sql); |
721 | 721 | } |
722 | - redirect_header('tools.php?op=editlookup&id=' . $field, 2, 'The value has been added.'); |
|
722 | + redirect_header('tools.php?op=editlookup&id='.$field, 2, 'The value has been added.'); |
|
723 | 723 | } |
724 | 724 | |
725 | 725 | /** |
@@ -728,7 +728,7 @@ discard block |
||
728 | 728 | function userfields($field = 0) |
729 | 729 | { |
730 | 730 | global $field; |
731 | - require_once __DIR__ . '/include/checkoutwizard.php'; |
|
731 | + require_once __DIR__.'/include/checkoutwizard.php'; |
|
732 | 732 | |
733 | 733 | $wizard = new CheckoutWizard(); |
734 | 734 | $action = $wizard->coalesce($_GET['action']); |
@@ -745,29 +745,29 @@ discard block |
||
745 | 745 | } else { |
746 | 746 | $form = _MA_PEDIGREE_FIELDPROP_ELSE; |
747 | 747 | } |
748 | - $form .= "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?op=userfields&action=' . $wizard->resetAction() . "'>"; |
|
749 | - $form .= "<input type='submit' value='" . _MA_PEDIGREE_FINISH_BUTTON . "'></form>"; |
|
748 | + $form .= "<form method='post' action='".$_SERVER['PHP_SELF'].'?op=userfields&action='.$wizard->resetAction()."'>"; |
|
749 | + $form .= "<input type='submit' value='"._MA_PEDIGREE_FINISH_BUTTON."'></form>"; |
|
750 | 750 | } else { |
751 | - $form = "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?op=userfields&action=' . $wizard->getStepName() . "'>"; |
|
751 | + $form = "<form method='post' action='".$_SERVER['PHP_SELF'].'?op=userfields&action='.$wizard->getStepName()."'>"; |
|
752 | 752 | if (0 == !$field) { |
753 | 753 | $form .= "<input type='hidden' name='field' value='{$field}'>"; |
754 | 754 | } |
755 | 755 | if (0 == !$wizard->getValue('field')) { // field allready exists (editing mode) |
756 | - $form .= '<h2>' . $wizard->getStepProperty('title') . ' - ' . $wizard->getValue('name') . ' - step ' . $wizard->getStepNumber() . '</h2>'; |
|
756 | + $form .= '<h2>'.$wizard->getStepProperty('title').' - '.$wizard->getValue('name').' - step '.$wizard->getStepNumber().'</h2>'; |
|
757 | 757 | } else { |
758 | - $form .= '<h2>' . $wizard->getStepProperty('title') . ' - step ' . $wizard->getStepNumber() . '</h2>'; |
|
758 | + $form .= '<h2>'.$wizard->getStepProperty('title').' - step '.$wizard->getStepNumber().'</h2>'; |
|
759 | 759 | } |
760 | 760 | |
761 | 761 | if ('fieldname' === $wizard->getStepName()) { |
762 | 762 | $form .= _MA_PEDIGREE_FIELD_FORM2; |
763 | - $form .= "<input type='text' name='name' value='" . htmlspecialchars($wizard->getValue('name'), ENT_QUOTES | ENT_HTML5) . "'>"; |
|
763 | + $form .= "<input type='text' name='name' value='".htmlspecialchars($wizard->getValue('name'), ENT_QUOTES | ENT_HTML5)."'>"; |
|
764 | 764 | $form .= "</td><td style='width: 25%;'>"; |
765 | 765 | if ($wizard->isError('name')) { |
766 | 766 | $form .= $wizard->getError('name'); |
767 | 767 | } |
768 | 768 | $form .= '</td></tr>'; |
769 | 769 | $form .= _MA_PEDIGREE_FIELD_FORM3; |
770 | - $form .= "<textarea name='explain' rows='5' cols='15'>" . htmlspecialchars($wizard->getValue('explain'), ENT_QUOTES | ENT_HTML5) . '</textarea>'; |
|
770 | + $form .= "<textarea name='explain' rows='5' cols='15'>".htmlspecialchars($wizard->getValue('explain'), ENT_QUOTES | ENT_HTML5).'</textarea>'; |
|
771 | 771 | $form .= "</td><td style='width: 25%;'>"; |
772 | 772 | if ($wizard->isError('explain')) { |
773 | 773 | $form .= $wizard->getError('explain'); |
@@ -798,10 +798,10 @@ discard block |
||
798 | 798 | $form .= "<input type='hidden' name='fc' value='{$i}'>"; |
799 | 799 | $form .= '<table>'; |
800 | 800 | for ($x = 1; $x < $i; ++$x) { |
801 | - $form .= "<tr><td>Value : ({$x})</td><td>" . htmlspecialchars($wizard->getValue('lookup' . $x), ENT_QUOTES | ENT_HTML5) . '</td></tr>'; |
|
801 | + $form .= "<tr><td>Value : ({$x})</td><td>".htmlspecialchars($wizard->getValue('lookup'.$x), ENT_QUOTES | ENT_HTML5).'</td></tr>'; |
|
802 | 802 | } |
803 | 803 | $form .= "<tr><td>Value : ({$i})</td><td>"; |
804 | - $form .= "<input type='text' name='lookup{$i}' value='" . htmlspecialchars($wizard->getValue('lookup' . $i), ENT_QUOTES | ENT_HTML5) . "'>"; |
|
804 | + $form .= "<input type='text' name='lookup{$i}' value='".htmlspecialchars($wizard->getValue('lookup'.$i), ENT_QUOTES | ENT_HTML5)."'>"; |
|
805 | 805 | $form .= "<input type='hidden' name='id{$i}' value='{$i}'>"; |
806 | 806 | if ($wizard->isError('lookup')) { |
807 | 807 | $form .= $wizard->getError('lookup'); |
@@ -817,25 +817,25 @@ discard block |
||
817 | 817 | if ('hassearch' === $wizard->getValue('hassearch')) { |
818 | 818 | $form .= ' checked =_MA_PEDIGREE_CHECKED '; |
819 | 819 | } |
820 | - $form .= '>' . _MA_PEDIGREE_FIELDSEARCH . '<br>'; |
|
820 | + $form .= '>'._MA_PEDIGREE_FIELDSEARCH.'<br>'; |
|
821 | 821 | } else { |
822 | - $form .= "<input type='checkbox' name='hassearch' disabled='true' value='hassearch'>" . _MA_PEDIGREE_FIELDSEARCH . '<br>'; |
|
822 | + $form .= "<input type='checkbox' name='hassearch' disabled='true' value='hassearch'>"._MA_PEDIGREE_FIELDSEARCH.'<br>'; |
|
823 | 823 | } |
824 | 824 | //viewinpedigree |
825 | 825 | $form .= "<input type='checkbox' name='viewinpedigree' value='viewinpedigree'"; |
826 | 826 | if ('viewinpedigree' === $wizard->getValue('viewinpedigree')) { |
827 | 827 | $form .= ' checked =_MA_PEDIGREE_CHECKED '; |
828 | 828 | } |
829 | - $form .= '>' . _MA_PEDIGREE_SHOWFIELD . '<br>'; |
|
829 | + $form .= '>'._MA_PEDIGREE_SHOWFIELD.'<br>'; |
|
830 | 830 | //viewinadvanced |
831 | 831 | if ('radiobutton' === $fieldtype || 'selectbox' === $fieldtype) { |
832 | 832 | $form .= "<input type='checkbox' name='viewinadvanced' value='viewinadvanced'"; |
833 | 833 | if ('viewinadvanced' === $wizard->getValue('viewinadvanced')) { |
834 | 834 | $form .= ' checked=checked'; |
835 | 835 | } |
836 | - $form .= '>' . _MA_PEDIGREE_SHOWFIELD_ADVANCE . '<br>'; |
|
836 | + $form .= '>'._MA_PEDIGREE_SHOWFIELD_ADVANCE.'<br>'; |
|
837 | 837 | } else { |
838 | - $form .= "<input type='checkbox' name='viewinadvanced' disabled='true' value='viewinadvanced'>" . _MA_PEDIGREE_SHOWFIELD_ADVANCE . '<br>'; |
|
838 | + $form .= "<input type='checkbox' name='viewinadvanced' disabled='true' value='viewinadvanced'>"._MA_PEDIGREE_SHOWFIELD_ADVANCE.'<br>'; |
|
839 | 839 | } |
840 | 840 | //viewinpie |
841 | 841 | if ('radiobutton' === $fieldtype || 'selectbox' === $fieldtype) { |
@@ -843,9 +843,9 @@ discard block |
||
843 | 843 | if ('viewinpie' === $wizard->getValue('viewinpie')) { |
844 | 844 | $form .= ' checked =_MA_PEDIGREE_CHECKED '; |
845 | 845 | } |
846 | - $form .= '>' . _MA_PEDIGREE_SHOWFIELD_PIECHART . '<br>'; |
|
846 | + $form .= '>'._MA_PEDIGREE_SHOWFIELD_PIECHART.'<br>'; |
|
847 | 847 | } else { |
848 | - $form .= "<input type='checkbox' name='viewinpie' disabled='true' value='viewinpie'>" . _MA_PEDIGREE_SHOWFIELD_PIECHART . '<br>'; |
|
848 | + $form .= "<input type='checkbox' name='viewinpie' disabled='true' value='viewinpie'>"._MA_PEDIGREE_SHOWFIELD_PIECHART.'<br>'; |
|
849 | 849 | } |
850 | 850 | //viewinlist |
851 | 851 | if (in_array($fieldtype, ['textbox', 'dateselect', 'urlfield', 'radiobutton', 'selectbox'])) { |
@@ -853,9 +853,9 @@ discard block |
||
853 | 853 | if ('viewinlist' === $wizard->getValue('viewinlist')) { |
854 | 854 | $form .= ' checked =_MA_PEDIGREE_CHECKED '; |
855 | 855 | } |
856 | - $form .= '>' . _MA_PEDIGREE_SHOWFIELD_RESULT . '<br>'; |
|
856 | + $form .= '>'._MA_PEDIGREE_SHOWFIELD_RESULT.'<br>'; |
|
857 | 857 | } else { |
858 | - $form .= "<input type='checkbox' name='viewinlist' disabled='true' value='viewinlist'>" . _MA_PEDIGREE_SHOWFIELD_RESULT . '<br>'; |
|
858 | + $form .= "<input type='checkbox' name='viewinlist' disabled='true' value='viewinlist'>"._MA_PEDIGREE_SHOWFIELD_RESULT.'<br>'; |
|
859 | 859 | } |
860 | 860 | //add a litter |
861 | 861 | $form .= "<input type='checkbox' name='Litter' value='Litter'"; |
@@ -865,7 +865,7 @@ discard block |
||
865 | 865 | //disable if generallitter is active (you cant have both) |
866 | 866 | $form .= " disabled='true'"; |
867 | 867 | } |
868 | - $form .= '>' . _MA_PEDIGREE_SHOWFIELD_ADDLITTER . '<br>'; |
|
868 | + $form .= '>'._MA_PEDIGREE_SHOWFIELD_ADDLITTER.'<br>'; |
|
869 | 869 | |
870 | 870 | //add a litter general |
871 | 871 | $form .= "<input type='checkbox' name='Generallitter' value='Generallitter'"; |
@@ -875,7 +875,7 @@ discard block |
||
875 | 875 | //disable if add a litter is active (you cant have both) |
876 | 876 | $form .= " disabled='true'"; |
877 | 877 | } |
878 | - $form .= '>' . _MA_PEDIGREE_SHOWFIELD_ADDLITTGLOBAL . '<br>'; |
|
878 | + $form .= '>'._MA_PEDIGREE_SHOWFIELD_ADDLITTGLOBAL.'<br>'; |
|
879 | 879 | } else { |
880 | 880 | if ('search' === $wizard->getStepName()) { |
881 | 881 | $form .= _MA_PEDIGREE_SEARCH_NAME; |
@@ -892,7 +892,7 @@ discard block |
||
892 | 892 | } |
893 | 893 | $form .= '</td></tr>'; |
894 | 894 | $form .= _MA_PEDIGREE_FIELDEXPLANSEARCH; |
895 | - $form .= "<textarea name='searchexplain' rows='5' cols='15'>" . htmlspecialchars($wizard->getValue('searchexplain'), ENT_QUOTES | ENT_HTML5) . '</textarea>'; |
|
895 | + $form .= "<textarea name='searchexplain' rows='5' cols='15'>".htmlspecialchars($wizard->getValue('searchexplain'), ENT_QUOTES | ENT_HTML5).'</textarea>'; |
|
896 | 896 | $form .= "</td><td style='width: 25%;'>"; |
897 | 897 | if ($wizard->isError('searchexplain')) { |
898 | 898 | $form .= $wizard->getError('searchexplain'); |
@@ -906,15 +906,15 @@ discard block |
||
906 | 906 | $form .= "Default value : <select size='1' name='defaultvalue'>"; |
907 | 907 | $radioarray = $wizard->getValue('radioarray'); |
908 | 908 | foreach ($radioarray as $x => $xValue) { |
909 | - $form .= "<option value='" . $radioarray[$x]['id'] . "'"; |
|
909 | + $form .= "<option value='".$radioarray[$x]['id']."'"; |
|
910 | 910 | if ($wizard->getValue('defaultvalue') == $radioarray[$x]['id']) { |
911 | 911 | $form .= ' selected'; |
912 | 912 | } |
913 | - $form .= ' >' . $radioarray[$x]['value'] . '</option>'; |
|
913 | + $form .= ' >'.$radioarray[$x]['value'].'</option>'; |
|
914 | 914 | } |
915 | 915 | $form .= '</select>'; |
916 | 916 | } else { |
917 | - $form .= '' . _MA_PEDIGREE_FIELDVALUE . " <input type='text' name='defaultvalue' value='" . htmlspecialchars($wizard->getValue('defaultvalue'), ENT_QUOTES | ENT_HTML5) . "'>"; |
|
917 | + $form .= ''._MA_PEDIGREE_FIELDVALUE." <input type='text' name='defaultvalue' value='".htmlspecialchars($wizard->getValue('defaultvalue'), ENT_QUOTES | ENT_HTML5)."'>"; |
|
918 | 918 | } |
919 | 919 | $form .= _MA_PEDIGREE_DEFAUTVALUE_EXPLAIN; |
920 | 920 | } elseif ('confirm' === $wizard->getStepName()) { |
@@ -926,27 +926,27 @@ discard block |
||
926 | 926 | } |
927 | 927 | // } |
928 | 928 | // } |
929 | - $form .= '<b>' . _MA_PEDIGREE_FIELDCONTROL4 . $wizard->getValue('name') . '</b><br>'; |
|
930 | - $form .= '<b>' . _MA_PEDIGREE_FIELDCONTROL5 . stripslashes($wizard->getValue('explain')) . '</b><br>'; |
|
931 | - $form .= '<b>' . _MA_PEDIGREE_FIELDCONTROL6 . $wizard->getValue('fieldtype') . '</b><br>'; |
|
929 | + $form .= '<b>'._MA_PEDIGREE_FIELDCONTROL4.$wizard->getValue('name').'</b><br>'; |
|
930 | + $form .= '<b>'._MA_PEDIGREE_FIELDCONTROL5.stripslashes($wizard->getValue('explain')).'</b><br>'; |
|
931 | + $form .= '<b>'._MA_PEDIGREE_FIELDCONTROL6.$wizard->getValue('fieldtype').'</b><br>'; |
|
932 | 932 | if ('selectbox' === $wizard->getValue('fieldtype') |
933 | 933 | || 'radiobutton' === $wizard->getValue('fieldtype')) { |
934 | 934 | $count = $wizard->getValue('fc'); |
935 | 935 | for ($x = 1; $x < $count + 1; ++$x) { |
936 | 936 | $radioarray[] = [ |
937 | - 'id' => $wizard->getValue('id' . $x), |
|
938 | - 'value' => $wizard->getValue('lookup' . $x) |
|
937 | + 'id' => $wizard->getValue('id'.$x), |
|
938 | + 'value' => $wizard->getValue('lookup'.$x) |
|
939 | 939 | ]; |
940 | 940 | } |
941 | 941 | $val = $wizard->getValue('defaultvalue'); |
942 | - $form .= '<b>' . _MA_PEDIGREE_FIELDCONTROL7 . $wizard->getValue('lookup' . $val) . '</b><br>'; |
|
942 | + $form .= '<b>'._MA_PEDIGREE_FIELDCONTROL7.$wizard->getValue('lookup'.$val).'</b><br>'; |
|
943 | 943 | } else { |
944 | - $form .= '<b>' . _MA_PEDIGREE_FIELDCONTROL7 . $wizard->getValue('defaultvalue') . '</b><br>'; |
|
944 | + $form .= '<b>'._MA_PEDIGREE_FIELDCONTROL7.$wizard->getValue('defaultvalue').'</b><br>'; |
|
945 | 945 | } |
946 | 946 | if ('hasearch' === $wizard->getValue('hassearch')) { |
947 | - $form .= _MA_PEDIGREE_FIELDSEARCH . ' : <b> ' . _YES . '</b><br>'; |
|
948 | - $form .= '<b>' . _MA_PEDIGREE_FIELDSEARCH . $wizard->getValue('searchname') . '</b><br>'; |
|
949 | - $form .= '<b>' . _MA_PEDIGREE_FIELDCONTROL5 . $wizard->getValue('searhexplain') . '</b><br>'; |
|
947 | + $form .= _MA_PEDIGREE_FIELDSEARCH.' : <b> '._YES.'</b><br>'; |
|
948 | + $form .= '<b>'._MA_PEDIGREE_FIELDSEARCH.$wizard->getValue('searchname').'</b><br>'; |
|
949 | + $form .= '<b>'._MA_PEDIGREE_FIELDCONTROL5.$wizard->getValue('searhexplain').'</b><br>'; |
|
950 | 950 | } |
951 | 951 | if ('viewinpedigree' === $wizard->getValue('viewinpedigree')) { |
952 | 952 | $form .= _MA_PEDIGREE_SYNTH1; |
@@ -966,13 +966,13 @@ discard block |
||
966 | 966 | if ('Generallitter' === $wizard->getValue('generallitter')) { |
967 | 967 | $form .= _MA_PEDIGREE_SYNTH6; |
968 | 968 | } |
969 | - $form .= _MA_PEDIGREE_FIELDCONTROL3 . '<br><br>'; |
|
969 | + $form .= _MA_PEDIGREE_FIELDCONTROL3.'<br><br>'; |
|
970 | 970 | } |
971 | 971 | } |
972 | 972 | } |
973 | 973 | |
974 | 974 | if (!$wizard->isFirstStep()) { |
975 | - $form .= "<p><input type='submit' name='previous' value='<< " . _MA_PEDIGREE_PREVIOUS_BUTTON . "'> "; |
|
975 | + $form .= "<p><input type='submit' name='previous' value='<< "._MA_PEDIGREE_PREVIOUS_BUTTON."'> "; |
|
976 | 976 | } |
977 | 977 | $form .= "<input type='submit' name='reset' value=Exit> "; |
978 | 978 | $last = $wizard->isLastStep() ? _MA_PEDIGREE_FINISH_BUTTON : _MA_PEDIGREE_NEXT_BUTTON; |
@@ -991,7 +991,7 @@ discard block |
||
991 | 991 | $moduleConfig = $configHandler->getConfigsByCat(0, $module->getVar('mid')); |
992 | 992 | */ |
993 | 993 | $helper = Pedigree\Helper::getInstance(false); |
994 | - $form = 'Pedigree database module<br><br><li>Programming : James Cotton<br><li>Design & Layout : Ton van der Hagen<br><li>Version : ' |
|
994 | + $form = 'Pedigree database module<br><br><li>Programming : James Cotton<br><li>Design & Layout : Ton van der Hagen<br><li>Version : ' |
|
995 | 995 | . round($helper->getModule()->getVar('version') / 100, 2) |
996 | 996 | . ' ' |
997 | 997 | . $helper->getModule()->getVar('module_status') |
@@ -1009,7 +1009,7 @@ discard block |
||
1009 | 1009 | function userq() |
1010 | 1010 | { |
1011 | 1011 | $form = _MA_PEDIGREE_QUERIE_EXPLAN; |
1012 | - $d = $GLOBALS['xoops']->path('modules/' . $GLOBALS['xoopsModule']->dirname() . '/userqueries/'); |
|
1012 | + $d = $GLOBALS['xoops']->path('modules/'.$GLOBALS['xoopsModule']->dirname().'/userqueries/'); |
|
1013 | 1013 | |
1014 | 1014 | $dir = opendir($d); |
1015 | 1015 | while (false !== ($f = readdir($dir))) { |
@@ -1025,7 +1025,7 @@ discard block |
||
1025 | 1025 | */ |
1026 | 1026 | function userqrun($file) |
1027 | 1027 | { |
1028 | - include $GLOBALS['xoops']->path('modules/' . $GLOBALS['xoopsModule']->dirname() . "/userqueries/{$file}"); |
|
1028 | + include $GLOBALS['xoops']->path('modules/'.$GLOBALS['xoopsModule']->dirname()."/userqueries/{$file}"); |
|
1029 | 1029 | $GLOBALS['xoopsTpl']->assign('form', $form); |
1030 | 1030 | } |
1031 | 1031 | |
@@ -1038,13 +1038,13 @@ discard block |
||
1038 | 1038 | { |
1039 | 1039 | $form = _MA_PEDIGREE_ANCEST_EXPLAN; |
1040 | 1040 | $sql = 'SELECT d.id AS d_id, d.naam AS d_naam |
1041 | - FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' d |
|
1042 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' m ON m.id = d.mother |
|
1043 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' f ON f.id = d.father |
|
1044 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mm ON mm.id = m.mother |
|
1045 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mf ON mf.id = m.father |
|
1046 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fm ON fm.id = f.mother |
|
1047 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' ff ON ff.id = f.father |
|
1041 | + FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' d |
|
1042 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' m ON m.id = d.mother |
|
1043 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' f ON f.id = d.father |
|
1044 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mm ON mm.id = m.mother |
|
1045 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mf ON mf.id = m.father |
|
1046 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fm ON fm.id = f.mother |
|
1047 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' ff ON ff.id = f.father |
|
1048 | 1048 | WHERE |
1049 | 1049 | d.mother = d.id |
1050 | 1050 | OR d.father = d.id |
@@ -1076,8 +1076,8 @@ discard block |
||
1076 | 1076 | { |
1077 | 1077 | $form = _MA_PEDIGREE_GENDER_EXPLAN; |
1078 | 1078 | $sql = 'SELECT d.id AS d_id, d.naam AS d_naam, d.mother AS d_mother, m.roft AS m_roft |
1079 | - FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' d |
|
1080 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " m ON m.id = d.mother |
|
1079 | + FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' d |
|
1080 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree')." m ON m.id = d.mother |
|
1081 | 1081 | WHERE |
1082 | 1082 | d.mother = m.id |
1083 | 1083 | AND m.roft = '0' "; |
@@ -1085,15 +1085,15 @@ discard block |
||
1085 | 1085 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
1086 | 1086 | $form .= "<li><a href='dog.php?id={$row['d_id']}'>{$row['d_naam']}</a> [mother seems to be male]<br>"; |
1087 | 1087 | } |
1088 | - $sql = 'SELECT d.id AS d_id, d.naam AS d_naam, d.father AS d_father, f.roft AS f_roft |
|
1089 | - FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' d |
|
1090 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " f ON f.id = d.father |
|
1088 | + $sql = 'SELECT d.id AS d_id, d.naam AS d_naam, d.father AS d_father, f.roft AS f_roft |
|
1089 | + FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' d |
|
1090 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree')." f ON f.id = d.father |
|
1091 | 1091 | WHERE |
1092 | 1092 | d.father = f.id |
1093 | 1093 | AND f.roft = '1' "; |
1094 | 1094 | $result = $GLOBALS['xoopsDB']->query($sql); |
1095 | 1095 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
1096 | - $form .= '<li><a href="dog.php?id=' . $row['d_id'] . '">' . $row['d_naam'] . '</a> [father seems to be female]<br>'; |
|
1096 | + $form .= '<li><a href="dog.php?id='.$row['d_id'].'">'.$row['d_naam'].'</a> [father seems to be female]<br>'; |
|
1097 | 1097 | } |
1098 | 1098 | $GLOBALS['xoopsTpl']->assign('form', $form); |
1099 | 1099 | } |
@@ -1118,13 +1118,13 @@ discard block |
||
1118 | 1118 | { |
1119 | 1119 | global $helper; |
1120 | 1120 | $form = "Below the line are the animals which have been deleted from your database.<br><br>By clicking on the name you can reinsert them into the database.<br>By clicking on the 'X' in front of the name you can permanently delete the animal.<hr>"; |
1121 | - $sql = 'SELECT id, naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash'); |
|
1121 | + $sql = 'SELECT id, naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_trash'); |
|
1122 | 1122 | $result = $GLOBALS['xoopsDB']->query($sql); |
1123 | 1123 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
1124 | - $form .= '<a href="tools.php?op=delperm&id=' . $row['id'] . '"><img src=' . $GLOBALS['pathIcon16'] . '/delete.png></a> <a href="tools.php?op=restore&id=' . $row['id'] . '">' . $row['naam'] . '</a><br>'; |
|
1124 | + $form .= '<a href="tools.php?op=delperm&id='.$row['id'].'"><img src='.$GLOBALS['pathIcon16'].'/delete.png></a> <a href="tools.php?op=restore&id='.$row['id'].'">'.$row['naam'].'</a><br>'; |
|
1125 | 1125 | } |
1126 | 1126 | if ($GLOBALS['xoopsDB']->getRowsNum($result) > 0) { |
1127 | - $form .= '<hr><a href="tools.php?op=delall">Click here</a> to remove all these ' . $helper->getConfig('animalTypes') . ' permenantly '; |
|
1127 | + $form .= '<hr><a href="tools.php?op=delall">Click here</a> to remove all these '.$helper->getConfig('animalTypes').' permenantly '; |
|
1128 | 1128 | } |
1129 | 1129 | $GLOBALS['xoopsTpl']->assign('form', $form); |
1130 | 1130 | } |
@@ -1134,14 +1134,14 @@ discard block |
||
1134 | 1134 | */ |
1135 | 1135 | function delperm($id) |
1136 | 1136 | { |
1137 | - $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash') . " WHERE id = {$id}"; |
|
1137 | + $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_trash')." WHERE id = {$id}"; |
|
1138 | 1138 | $GLOBALS['xoopsDB']->queryF($sql); |
1139 | 1139 | deleted(); |
1140 | 1140 | } |
1141 | 1141 | |
1142 | 1142 | function delall() |
1143 | 1143 | { |
1144 | - $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash'); |
|
1144 | + $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_trash'); |
|
1145 | 1145 | $GLOBALS['xoopsDB']->queryF($sql); |
1146 | 1146 | deleted(); |
1147 | 1147 | } |
@@ -1152,18 +1152,18 @@ discard block |
||
1152 | 1152 | function restore($id) |
1153 | 1153 | { |
1154 | 1154 | $queryvalues = ''; |
1155 | - $sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash') . ' WHERE id = ' . $id; |
|
1155 | + $sql = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_trash').' WHERE id = '.$id; |
|
1156 | 1156 | $result = $GLOBALS['xoopsDB']->query($sql); |
1157 | 1157 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
1158 | 1158 | foreach ($row as $key => $values) { |
1159 | - $queryvalues .= "'" . $values . "',"; |
|
1159 | + $queryvalues .= "'".$values."',"; |
|
1160 | 1160 | } |
1161 | 1161 | $outgoing = substr_replace($queryvalues, '', -1); |
1162 | - $query = 'INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' VALUES (' . $outgoing . ')'; |
|
1162 | + $query = 'INSERT INTO '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' VALUES ('.$outgoing.')'; |
|
1163 | 1163 | $GLOBALS['xoopsDB']->queryF($query); |
1164 | - $delquery = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash') . ' WHERE id = ' . $id; |
|
1164 | + $delquery = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_trash').' WHERE id = '.$id; |
|
1165 | 1165 | $GLOBALS['xoopsDB']->queryF($delquery); |
1166 | - $form = '<li><a href="pedigree.php?pedid=' . $row['id'] . '">' . $row['naam'] . '</a> has been restored into the database.<hr>'; |
|
1166 | + $form = '<li><a href="pedigree.php?pedid='.$row['id'].'">'.$row['naam'].'</a> has been restored into the database.<hr>'; |
|
1167 | 1167 | } |
1168 | 1168 | if (isset($form)) { |
1169 | 1169 | $GLOBALS['xoopsTpl']->assign('form', $form); |
@@ -1174,7 +1174,7 @@ discard block |
||
1174 | 1174 | { |
1175 | 1175 | $helper = Pedigree\Helper::getInstance(); |
1176 | 1176 | |
1177 | - include XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
1177 | + include XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
1178 | 1178 | $form = new \XoopsThemeForm(_MA_PEDIGREE_BLOCK_SETTING, 'settings', 'tools.php?op=settingssave', 'POST', 1); |
1179 | 1179 | $form->addElement(new \XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360)); |
1180 | 1180 | $select = new \XoopsFormSelect(_MA_PEDIGREE_RESULT, 'perpage', $value = $helper->getConfig('perpage'), $size = 1, $multiple = false); |
@@ -1214,7 +1214,7 @@ discard block |
||
1214 | 1214 | $radiolit->addOption(0, $name = _MA_PEDIGREE_NO); |
1215 | 1215 | $form->addElement($radiolit); |
1216 | 1216 | $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_USE_LITTER_EXPLAIN)); |
1217 | - $radioch = new \XoopsFormRadio(PED_SHOW_KITT_A . $helper->getConfig('children') . _MA_PEDIGREE_SHOW_KITT_B, 'pups', $value = $helper->getConfig('pups')); |
|
1217 | + $radioch = new \XoopsFormRadio(PED_SHOW_KITT_A.$helper->getConfig('children')._MA_PEDIGREE_SHOW_KITT_B, 'pups', $value = $helper->getConfig('pups')); |
|
1218 | 1218 | $radioch->addOption(1, $name = _MA_PEDIGREE_YES); |
1219 | 1219 | $radioch->addOption(0, $name = _MA_PEDIGREE_NO); |
1220 | 1220 | $form->addElement($radioch); |
@@ -1239,7 +1239,7 @@ discard block |
||
1239 | 1239 | foreach ($_POST as $key => $values) { |
1240 | 1240 | if (in_array($key, $settings)) { |
1241 | 1241 | // $query = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('config') . " SET conf_value = '" . $values . "' WHERE conf_name = '" . $key . "'"; |
1242 | - $query = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('config') . " SET conf_value = '" . $GLOBALS['xoopsDB']->escape($values) . "' WHERE conf_name = '" . $GLOBALS['xoopsDB']->escape($key) . "'"; |
|
1242 | + $query = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('config')." SET conf_value = '".$GLOBALS['xoopsDB']->escape($values)."' WHERE conf_name = '".$GLOBALS['xoopsDB']->escape($key)."'"; |
|
1243 | 1243 | $GLOBALS['xoopsDB']->query($query); |
1244 | 1244 | } |
1245 | 1245 | } |
@@ -1249,28 +1249,28 @@ discard block |
||
1249 | 1249 | function lang() |
1250 | 1250 | { |
1251 | 1251 | global $helper; |
1252 | - include XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
1252 | + include XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
1253 | 1253 | $form = new \XoopsThemeForm(_MA_PEDIGREE_BLOCK_NAME, 'language', 'tools.php?op=langsave', 'post', true); |
1254 | 1254 | $form->addElement(new \XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360)); |
1255 | 1255 | $form->addElement(new \XoopsFormText(_MA_PEDIGREE_TYPE_AN, 'animalType', $size = 50, $maxsize = 255, $value = $helper->getConfig('animalType'))); |
1256 | - $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FIELD_EXPLAIN . $helper->getConfig('animalType') . _MA_PEDIGREE_SEARCH_FORM . $helper->getConfig('animalType') . '</b>.')); |
|
1256 | + $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FIELD_EXPLAIN.$helper->getConfig('animalType')._MA_PEDIGREE_SEARCH_FORM.$helper->getConfig('animalType').'</b>.')); |
|
1257 | 1257 | $form->addElement(new \XoopsFormText(_MA_PEDIGREE_TYPE_AN, 'animalTypes', $size = 50, $maxsize = 255, $value = $value = $helper->getConfig('animalTypes'))); |
1258 | - $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FIELD_EXPLAIN2 . $helper->getConfig('animalTypes') . _MA_PEDIGREE_FIELD_EXPLAIN3)); |
|
1258 | + $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FIELD_EXPLAIN2.$helper->getConfig('animalTypes')._MA_PEDIGREE_FIELD_EXPLAIN3)); |
|
1259 | 1259 | $form->addElement(new \XoopsFormText(_MA_PEDIGREE_MALE, 'male', $size = 50, $maxsize = 255, $value = $helper->getConfig('male'))); |
1260 | 1260 | $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_MALE_EXPLAIN)); |
1261 | 1261 | $form->addElement(new \XoopsFormText(_MA_PEDIGREE_FEMALE, 'female', $size = 50, $maxsize = 255, $value = $helper->getConfig('female'))); |
1262 | 1262 | $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FEMALE_EXPLAIN)); |
1263 | 1263 | $form->addElement(new \XoopsFormText(_MA_PEDIGREE_CHILDREN, 'children', $size = 50, $maxsize = 255, $value = $helper->getConfig('children'))); |
1264 | - $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_KITTEN_EXPLAIN1 . $helper->getConfig('animalTypes') . _MA_PEDIGREE_KITTEN_EXPLAIN2)); |
|
1264 | + $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_KITTEN_EXPLAIN1.$helper->getConfig('animalTypes')._MA_PEDIGREE_KITTEN_EXPLAIN2)); |
|
1265 | 1265 | $form->addElement(new \XoopsFormText(_MA_PEDIGREE_MOTHER, 'mother', $size = 50, $maxsize = 255, $value = $helper->getConfig('mother'))); |
1266 | - $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_MOTHER1 . $helper->getConfig('animalTypes') . _MA_PEDIGREE_MOTHER2)); |
|
1266 | + $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_MOTHER1.$helper->getConfig('animalTypes')._MA_PEDIGREE_MOTHER2)); |
|
1267 | 1267 | $form->addElement(new \XoopsFormText(_MA_PEDIGREE_FATHER, 'father', $size = 50, $maxsize = 255, $value = $helper->getConfig('father'))); |
1268 | - $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FATHER1 . $helper->getConfig('animalTypes') . _MA_PEDIGREE_FATHER2)); |
|
1268 | + $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FATHER1.$helper->getConfig('animalTypes')._MA_PEDIGREE_FATHER2)); |
|
1269 | 1269 | $form->addElement(new \XoopsFormText(_MA_PEDIGREE_LITTER, 'litter', $size = 50, $maxsize = 255, $value = $helper->getConfig('litter'))); |
1270 | 1270 | $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_LITTER1)); |
1271 | 1271 | $form->addElement(new \XoopsFormTextArea(_MA_PEDIGREE_WELC_TEXT, 'welcome', $value = $helper->getConfig('welcome'), $rows = 15, $cols = 50)); |
1272 | 1272 | |
1273 | - $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_WELC_TXT_EXPLAIN . $helper->getConfig('animalType') . '<br>[animalTypes] = ' . $helper->getConfig('animalTypes') . _MA_PEDIGREE_WELC_TXT_EXPLAIN2)); |
|
1273 | + $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_WELC_TXT_EXPLAIN.$helper->getConfig('animalType').'<br>[animalTypes] = '.$helper->getConfig('animalTypes')._MA_PEDIGREE_WELC_TXT_EXPLAIN2)); |
|
1274 | 1274 | $form->addElement(new \XoopsFormButton('', 'button_id', 'Submit', 'submit')); |
1275 | 1275 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
1276 | 1276 | } |
@@ -1296,7 +1296,7 @@ discard block |
||
1296 | 1296 | ]; |
1297 | 1297 | foreach ($_POST as $key => $values) { |
1298 | 1298 | if (in_array($key, $settings)) { |
1299 | - $query = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('config') . " SET conf_value = '{$values}' WHERE conf_name = '{$key}'"; |
|
1299 | + $query = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('config')." SET conf_value = '{$values}' WHERE conf_name = '{$key}'"; |
|
1300 | 1300 | $GLOBALS['xoopsDB']->query($query); |
1301 | 1301 | } |
1302 | 1302 | } |
@@ -125,14 +125,14 @@ discard block |
||
125 | 125 | '[children]' => $moduleConfig['children'] |
126 | 126 | ]) . '</a>'); |
127 | 127 | $xoopsTpl->assign('topfemales', '<a href="topstud.php?com=mother">' . strtr(_MA_PEDIGREE_ADV_BITC, [ |
128 | - '[female]' => $moduleConfig['female'], |
|
129 | - '[children]' => $moduleConfig['children'] |
|
130 | - ]) . '</a>'); |
|
128 | + '[female]' => $moduleConfig['female'], |
|
129 | + '[children]' => $moduleConfig['children'] |
|
130 | + ]) . '</a>'); |
|
131 | 131 | $xoopsTpl->assign('tnmftitle', strtr(_MA_PEDIGREE_ADV_TNMFTIT, ['[male]' => $moduleConfig['male'], '[female]' => $moduleConfig['female']])); |
132 | 132 | $xoopsTpl->assign('countmales', '<img src="assets/images/male.gif"> ' . strtr(_MA_PEDIGREE_ADV_TCMA, [ |
133 | - '[male]' => $moduleConfig['male'], |
|
134 | - '[female]' => $moduleConfig['female'] |
|
135 | - ]) . ' : <a href="result.php?f=roft&w=zero&o=naam">' . $countmales . '</a>'); |
|
133 | + '[male]' => $moduleConfig['male'], |
|
134 | + '[female]' => $moduleConfig['female'] |
|
135 | + ]) . ' : <a href="result.php?f=roft&w=zero&o=naam">' . $countmales . '</a>'); |
|
136 | 136 | $xoopsTpl->assign('countfemales', '<img src="assets/images/female.gif"> ' . strtr(_MA_PEDIGREE_ADV_TCFE, [ |
137 | 137 | '[male]' => $moduleConfig['male'], |
138 | 138 | '[female]' => $moduleConfig['female'] |
@@ -144,13 +144,13 @@ discard block |
||
144 | 144 | $xoopsTpl->assign('orptitle', _MA_PEDIGREE_ADV_ORPTIT); |
145 | 145 | $xoopsTpl->assign('orpall', '<a href="result.php?f=father=0 and mother&w=zero&o=naam">' . strtr(_MA_PEDIGREE_ADV_ORPALL, ['[animalTypes]' => $moduleConfig['animalTypes']]) . '</a>'); |
146 | 146 | $xoopsTpl->assign('orpdad', '<a href="result.php?f=mother!=0 and father&w=zero&o=naam">' . strtr(_MA_PEDIGREE_ADV_ORPDAD, [ |
147 | - '[father]' => $moduleConfig['father'], |
|
148 | - '[animalTypes]' => $moduleConfig['animalTypes'] |
|
149 | - ]) . '</a>'); |
|
147 | + '[father]' => $moduleConfig['father'], |
|
148 | + '[animalTypes]' => $moduleConfig['animalTypes'] |
|
149 | + ]) . '</a>'); |
|
150 | 150 | $xoopsTpl->assign('orpmum', '<a href="result.php?f=father!=0 and mother&w=zero&o=naam">' . strtr(_MA_PEDIGREE_ADV_ORPMUM, [ |
151 | - '[mother]' => $moduleConfig['mother'], |
|
152 | - '[animalTypes]' => $moduleConfig['animalTypes'] |
|
153 | - ]) . '</a>'); |
|
151 | + '[mother]' => $moduleConfig['mother'], |
|
152 | + '[animalTypes]' => $moduleConfig['animalTypes'] |
|
153 | + ]) . '</a>'); |
|
154 | 154 | $xoopsTpl->assign('position', _MA_PEDIGREE_M50_POS); |
155 | 155 | $xoopsTpl->assign('numdogs', _MA_PEDIGREE_M50_NUMD); |
156 | 156 | $xoopsTpl->assign('maledogs', $perc_mdogs); |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | use XoopsModules\Pedigree; |
5 | 5 | |
6 | 6 | //require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
7 | -require_once __DIR__ . '/header.php'; |
|
7 | +require_once __DIR__.'/header.php'; |
|
8 | 8 | $moduleDirName = basename(__DIR__); |
9 | 9 | xoops_loadLanguage('main', $moduleDirName); |
10 | 10 | |
@@ -13,11 +13,11 @@ discard block |
||
13 | 13 | |
14 | 14 | $GLOBALS['xoopsOption']['template_main'] = 'pedigree_advanced.tpl'; |
15 | 15 | |
16 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
16 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
17 | 17 | // Include any common code for this module. |
18 | -require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->dirname() . '/include/common.php'; |
|
19 | -$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js'); |
|
20 | -$xoTheme->addScript(PEDIGREE_URL . '/assets/js/jquery.canvasjs.min.js'); |
|
18 | +require_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->dirname().'/include/common.php'; |
|
19 | +$xoTheme->addScript(XOOPS_URL.'/browse.php?Frameworks/jquery/jquery.js'); |
|
20 | +$xoTheme->addScript(PEDIGREE_URL.'/assets/js/jquery.canvasjs.min.js'); |
|
21 | 21 | |
22 | 22 | global $xoopsTpl, $xoopsDB; |
23 | 23 | $totpl = []; |
@@ -41,11 +41,11 @@ discard block |
||
41 | 41 | $title = $colors[7]; |
42 | 42 | |
43 | 43 | //query to count male dogs |
44 | -$result = $GLOBALS['xoopsDB']->query('SELECT count(id) FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE roft='0'"); |
|
44 | +$result = $GLOBALS['xoopsDB']->query('SELECT count(id) FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE roft='0'"); |
|
45 | 45 | list($countmales) = $GLOBALS['xoopsDB']->fetchRow($result); |
46 | 46 | |
47 | 47 | //query to count female dogs |
48 | -$result = $GLOBALS['xoopsDB']->query('SELECT count(id) FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE roft='1'"); |
|
48 | +$result = $GLOBALS['xoopsDB']->query('SELECT count(id) FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE roft='1'"); |
|
49 | 49 | list($countfemales) = $GLOBALS['xoopsDB']->fetchRow($result); |
50 | 50 | |
51 | 51 | /* |
@@ -120,40 +120,40 @@ discard block |
||
120 | 120 | $xoopsTpl->assign('pro', true); |
121 | 121 | } |
122 | 122 | $xoopsTpl->assign('title', strtr(_MA_PEDIGREE_ADV_VTMF, ['[male]' => $moduleConfig['male'], '[female]' => $moduleConfig['female']])); |
123 | -$xoopsTpl->assign('topmales', '<a href="topstud.php?com=father">' . strtr(_MA_PEDIGREE_ADV_STUD, [ |
|
123 | +$xoopsTpl->assign('topmales', '<a href="topstud.php?com=father">'.strtr(_MA_PEDIGREE_ADV_STUD, [ |
|
124 | 124 | '[male]' => $moduleConfig['male'], |
125 | 125 | '[children]' => $moduleConfig['children'] |
126 | - ]) . '</a>'); |
|
127 | -$xoopsTpl->assign('topfemales', '<a href="topstud.php?com=mother">' . strtr(_MA_PEDIGREE_ADV_BITC, [ |
|
126 | + ]).'</a>'); |
|
127 | +$xoopsTpl->assign('topfemales', '<a href="topstud.php?com=mother">'.strtr(_MA_PEDIGREE_ADV_BITC, [ |
|
128 | 128 | '[female]' => $moduleConfig['female'], |
129 | 129 | '[children]' => $moduleConfig['children'] |
130 | - ]) . '</a>'); |
|
130 | + ]).'</a>'); |
|
131 | 131 | $xoopsTpl->assign('tnmftitle', strtr(_MA_PEDIGREE_ADV_TNMFTIT, ['[male]' => $moduleConfig['male'], '[female]' => $moduleConfig['female']])); |
132 | -$xoopsTpl->assign('countmales', '<img src="assets/images/male.gif"> ' . strtr(_MA_PEDIGREE_ADV_TCMA, [ |
|
132 | +$xoopsTpl->assign('countmales', '<img src="assets/images/male.gif"> '.strtr(_MA_PEDIGREE_ADV_TCMA, [ |
|
133 | 133 | '[male]' => $moduleConfig['male'], |
134 | 134 | '[female]' => $moduleConfig['female'] |
135 | - ]) . ' : <a href="result.php?f=roft&w=zero&o=naam">' . $countmales . '</a>'); |
|
136 | -$xoopsTpl->assign('countfemales', '<img src="assets/images/female.gif"> ' . strtr(_MA_PEDIGREE_ADV_TCFE, [ |
|
135 | + ]).' : <a href="result.php?f=roft&w=zero&o=naam">'.$countmales.'</a>'); |
|
136 | +$xoopsTpl->assign('countfemales', '<img src="assets/images/female.gif"> '.strtr(_MA_PEDIGREE_ADV_TCFE, [ |
|
137 | 137 | '[male]' => $moduleConfig['male'], |
138 | 138 | '[female]' => $moduleConfig['female'] |
139 | - ]) . ' : <a href="result.php?f=roft&w=1&o=naam">' . $countfemales) . '</a>'; |
|
139 | + ]).' : <a href="result.php?f=roft&w=1&o=naam">'.$countfemales).'</a>'; |
|
140 | 140 | $xoopsTpl->assign('pienumber', '<img src="assets/images/numbers.png">'); |
141 | 141 | $xoopsTpl->assign('totpl', $totpl); |
142 | 142 | $xoopsTpl->assign('books', $books); |
143 | 143 | |
144 | 144 | $xoopsTpl->assign('orptitle', _MA_PEDIGREE_ADV_ORPTIT); |
145 | -$xoopsTpl->assign('orpall', '<a href="result.php?f=father=0 and mother&w=zero&o=naam">' . strtr(_MA_PEDIGREE_ADV_ORPALL, ['[animalTypes]' => $moduleConfig['animalTypes']]) . '</a>'); |
|
146 | -$xoopsTpl->assign('orpdad', '<a href="result.php?f=mother!=0 and father&w=zero&o=naam">' . strtr(_MA_PEDIGREE_ADV_ORPDAD, [ |
|
145 | +$xoopsTpl->assign('orpall', '<a href="result.php?f=father=0 and mother&w=zero&o=naam">'.strtr(_MA_PEDIGREE_ADV_ORPALL, ['[animalTypes]' => $moduleConfig['animalTypes']]).'</a>'); |
|
146 | +$xoopsTpl->assign('orpdad', '<a href="result.php?f=mother!=0 and father&w=zero&o=naam">'.strtr(_MA_PEDIGREE_ADV_ORPDAD, [ |
|
147 | 147 | '[father]' => $moduleConfig['father'], |
148 | 148 | '[animalTypes]' => $moduleConfig['animalTypes'] |
149 | - ]) . '</a>'); |
|
150 | -$xoopsTpl->assign('orpmum', '<a href="result.php?f=father!=0 and mother&w=zero&o=naam">' . strtr(_MA_PEDIGREE_ADV_ORPMUM, [ |
|
149 | + ]).'</a>'); |
|
150 | +$xoopsTpl->assign('orpmum', '<a href="result.php?f=father!=0 and mother&w=zero&o=naam">'.strtr(_MA_PEDIGREE_ADV_ORPMUM, [ |
|
151 | 151 | '[mother]' => $moduleConfig['mother'], |
152 | 152 | '[animalTypes]' => $moduleConfig['animalTypes'] |
153 | - ]) . '</a>'); |
|
153 | + ]).'</a>'); |
|
154 | 154 | $xoopsTpl->assign('position', _MA_PEDIGREE_M50_POS); |
155 | 155 | $xoopsTpl->assign('numdogs', _MA_PEDIGREE_M50_NUMD); |
156 | 156 | $xoopsTpl->assign('maledogs', $perc_mdogs); |
157 | 157 | $xoopsTpl->assign('femaledogs', $perc_fdogs); |
158 | 158 | //comments and footer |
159 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
159 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -87,12 +87,12 @@ |
||
87 | 87 | |
88 | 88 | //add data to smarty template |
89 | 89 | $GLOBALS['xoopsTpl']->assign([ |
90 | - 'sselect' => strtr(_MA_PEDIGREE_SELECT, ['[animalType]' => $moduleConfig['animalType']]), |
|
91 | - 'explain' => _MA_PEDIGREE_EXPLAIN, |
|
92 | - 'sname' => _MA_PEDIGREE_SEARCHNAME, |
|
93 | - 'snameex' => strtr(_MA_PEDIGREE_SEARCHNAME_EX, ['[animalTypes]' => $moduleConfig['animalTypes']]), |
|
94 | - 'usersearch' => isset($usersearch) ? $usersearch : '' |
|
95 | - ]); |
|
90 | + 'sselect' => strtr(_MA_PEDIGREE_SELECT, ['[animalType]' => $moduleConfig['animalType']]), |
|
91 | + 'explain' => _MA_PEDIGREE_EXPLAIN, |
|
92 | + 'sname' => _MA_PEDIGREE_SEARCHNAME, |
|
93 | + 'snameex' => strtr(_MA_PEDIGREE_SEARCHNAME_EX, ['[animalTypes]' => $moduleConfig['animalTypes']]), |
|
94 | + 'usersearch' => isset($usersearch) ? $usersearch : '' |
|
95 | + ]); |
|
96 | 96 | $GLOBALS['xoopsTpl']->assign('showwelcome', $moduleConfig['showwelcome']); |
97 | 97 | //$GLOBALS['xoopsTpl']->assign('welcome', $GLOBALS['myts']->displayTarea($moduleConfig['welcome'])); |
98 | 98 | //$word = $myts->displayTarea(strtr($helper->getConfig('welcome'), array('[numanimals]' => $numdogs, '[animalType]' => $helper->getConfig('animalType'), '[animalTypes]' => $helper->getConfig('animalTypes')))); |
@@ -3,35 +3,35 @@ discard block |
||
3 | 3 | |
4 | 4 | use XoopsModules\Pedigree; |
5 | 5 | |
6 | -require_once __DIR__ . '/header.php'; |
|
6 | +require_once __DIR__.'/header.php'; |
|
7 | 7 | |
8 | 8 | $moduleDirName = basename(__DIR__); |
9 | 9 | xoops_loadLanguage('main', $moduleDirName); |
10 | 10 | |
11 | 11 | // Include any common code for this module. |
12 | -require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php'; |
|
13 | -require_once __DIR__ . '/welcome.php'; |
|
12 | +require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php'; |
|
13 | +require_once __DIR__.'/welcome.php'; |
|
14 | 14 | |
15 | 15 | $GLOBALS['xoopsOption']['template_main'] = 'pedigree_index.tpl'; |
16 | 16 | |
17 | 17 | include $GLOBALS['xoops']->path('/header.php'); |
18 | 18 | |
19 | 19 | //load javascript |
20 | -$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js'); |
|
20 | +$xoTheme->addScript(XOOPS_URL.'/browse.php?Frameworks/jquery/jquery.js'); |
|
21 | 21 | //$xoTheme->addScript(PEDIGREE_URL . '/assets/js/jquery.ThickBox/thickbox-compressed.js'); |
22 | 22 | |
23 | -$xoTheme->addScript(PEDIGREE_URL . '/assets/js/jquery.magnific-popup.min.js'); |
|
24 | -$xoTheme->addScript(PEDIGREE_URL . '/assets/js/colpick.js'); |
|
23 | +$xoTheme->addScript(PEDIGREE_URL.'/assets/js/jquery.magnific-popup.min.js'); |
|
24 | +$xoTheme->addScript(PEDIGREE_URL.'/assets/js/colpick.js'); |
|
25 | 25 | |
26 | 26 | //load CSS style sheets |
27 | -$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/colpick.css'); |
|
28 | -$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/magnific-popup.css'); |
|
29 | -$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/style.css'); |
|
27 | +$xoTheme->addStylesheet(PEDIGREE_URL.'/assets/css/colpick.css'); |
|
28 | +$xoTheme->addStylesheet(PEDIGREE_URL.'/assets/css/magnific-popup.css'); |
|
29 | +$xoTheme->addStylesheet(PEDIGREE_URL.'/assets/css/style.css'); |
|
30 | 30 | |
31 | 31 | //$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/jquery.ThickBox/thickbox.css'); |
32 | 32 | //$xoTheme->addStylesheet(PEDIGREE_URL . '/module.css'); |
33 | 33 | |
34 | -$GLOBALS['xoopsTpl']->assign('pedigree_url', PEDIGREE_URL . '/'); |
|
34 | +$GLOBALS['xoopsTpl']->assign('pedigree_url', PEDIGREE_URL.'/'); |
|
35 | 35 | |
36 | 36 | // Breadcrumb |
37 | 37 | $breadcrumb = new Pedigree\Breadcrumb(); |
@@ -58,11 +58,11 @@ discard block |
||
58 | 58 | if ($userField->isActive() && $userField->hasSearch()) { |
59 | 59 | $fieldType = $userField->getSetting('FieldType'); |
60 | 60 | $fieldObject = new $fieldType($userField, $animal); |
61 | - $function = 'user' . $iValue . $fieldObject->getSearchString(); |
|
61 | + $function = 'user'.$iValue.$fieldObject->getSearchString(); |
|
62 | 62 | //echo $function."<br>"; |
63 | 63 | $usersearch[] = [ |
64 | 64 | 'title' => $userField->getSetting('SearchName'), |
65 | - 'searchid' => 'user' . $iValue, |
|
65 | + 'searchid' => 'user'.$iValue, |
|
66 | 66 | 'function' => $function, |
67 | 67 | 'explanation' => $userField->getSetting('SearchExplanation'), |
68 | 68 | 'searchfield' => $fieldObject->searchfield() |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | //$catarray['letters'] = Pedigree\Utility::lettersChoice(); |
74 | -$letter = ''; |
|
74 | +$letter = ''; |
|
75 | 75 | $myObject = Pedigree\Helper::getInstance(); |
76 | 76 | $activeObject = 'Tree'; |
77 | 77 | $name = 'naam'; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $link2 = '%25'; |
80 | 80 | |
81 | 81 | $criteria = $myObject->getHandler('Tree')->getActiveCriteria(); |
82 | -$criteria->setGroupby('UPPER(LEFT(' . $name . ',1))'); |
|
82 | +$criteria->setGroupby('UPPER(LEFT('.$name.',1))'); |
|
83 | 83 | $catarray['letters'] = Pedigree\Utility::lettersChoice($myObject, $activeObject, $criteria, $name, $link, $link2); |
84 | 84 | //$catarray['toolbar'] = pedigree_toolbar(); |
85 | 85 | $xoopsTpl->assign('catarray', $catarray); |
@@ -5,11 +5,11 @@ discard block |
||
5 | 5 | use XoopsModules\Pedigree; |
6 | 6 | |
7 | 7 | //require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
8 | -require_once __DIR__ . '/header.php'; |
|
8 | +require_once __DIR__.'/header.php'; |
|
9 | 9 | $moduleDirName = basename(__DIR__); |
10 | 10 | xoops_loadLanguage('main', $moduleDirName); |
11 | 11 | // Include any common code for this module. |
12 | -require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php'; |
|
12 | +require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php'; |
|
13 | 13 | |
14 | 14 | // Get all HTTP post or get parameters into global variables that are prefixed with "param_" |
15 | 15 | //import_request_variables("gp", "param_"); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | extract($_POST, EXTR_PREFIX_ALL, 'param'); |
18 | 18 | |
19 | 19 | $GLOBALS['xoopsOption']['template_main'] = 'pedigree_dog.tpl'; |
20 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
20 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
21 | 21 | |
22 | 22 | global $xoopsUser, $xoopsTpl, $xoopsDB, $xoopsModuleConfig, $xoopsModule; |
23 | 23 | global $numofcolumns, $numMatch, $pages, $columns, $dogs; |
@@ -43,78 +43,78 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | if (isset($_GET['delpicture']) && 'true' === $_GET['delpicture']) { |
46 | - $delpicsql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " SET foto = '' WHERE id = '" . $id . "'"; |
|
46 | + $delpicsql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." SET foto = '' WHERE id = '".$id."'"; |
|
47 | 47 | $GLOBALS['xoopsDB']->query($delpicsql); |
48 | 48 | } |
49 | 49 | //query |
50 | -$queryString = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id=' . $id; |
|
50 | +$queryString = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id='.$id; |
|
51 | 51 | $result = $GLOBALS['xoopsDB']->query($queryString); |
52 | 52 | |
53 | 53 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
54 | 54 | //name |
55 | 55 | $naam = stripslashes($row['naam']); |
56 | - $xoopsTpl->assign('xoops_pagetitle', $naam . ' -- detailed information'); |
|
56 | + $xoopsTpl->assign('xoops_pagetitle', $naam.' -- detailed information'); |
|
57 | 57 | //owner |
58 | 58 | if ('0' != $row['id_owner']) { |
59 | - $queryeig = 'SELECT id, lastname, firstname FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' WHERE id=' . $row['id_owner']; |
|
59 | + $queryeig = 'SELECT id, lastname, firstname FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' WHERE id='.$row['id_owner']; |
|
60 | 60 | $reseig = $GLOBALS['xoopsDB']->query($queryeig); |
61 | 61 | while (false !== ($roweig = $GLOBALS['xoopsDB']->fetchArray($reseig))) { |
62 | - $eig = '<a href="owner.php?ownid=' . $roweig['id'] . '">' . $roweig['firstname'] . ' ' . $roweig['lastname'] . '</a>'; |
|
62 | + $eig = '<a href="owner.php?ownid='.$roweig['id'].'">'.$roweig['firstname'].' '.$roweig['lastname'].'</a>'; |
|
63 | 63 | } |
64 | 64 | } else { |
65 | - $eig = '<a href="update.php?id=' . $row['id'] . '&fld=ow">' . _MA_PEDIGREE_UNKNOWN . '</a>'; |
|
65 | + $eig = '<a href="update.php?id='.$row['id'].'&fld=ow">'._MA_PEDIGREE_UNKNOWN.'</a>'; |
|
66 | 66 | } |
67 | 67 | //breeder |
68 | 68 | if ('0' != $row['id_breeder']) { |
69 | - $queryfok = 'SELECT id, lastname, firstname FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' WHERE id=' . $row['id_breeder']; |
|
69 | + $queryfok = 'SELECT id, lastname, firstname FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' WHERE id='.$row['id_breeder']; |
|
70 | 70 | $resfok = $GLOBALS['xoopsDB']->query($queryfok); |
71 | 71 | while (false !== ($rowfok = $GLOBALS['xoopsDB']->fetchArray($resfok))) { |
72 | - $fok = '<a href="owner.php?ownid=' . $rowfok['id'] . '">' . $rowfok['firstname'] . ' ' . $rowfok['lastname'] . '</a>'; |
|
72 | + $fok = '<a href="owner.php?ownid='.$rowfok['id'].'">'.$rowfok['firstname'].' '.$rowfok['lastname'].'</a>'; |
|
73 | 73 | } |
74 | 74 | } else { |
75 | - $fok = '<a href="update.php?id=' . $row['id'] . '&fld=br">' . _MA_PEDIGREE_UNKNOWN . '</a>'; |
|
75 | + $fok = '<a href="update.php?id='.$row['id'].'&fld=br">'._MA_PEDIGREE_UNKNOWN.'</a>'; |
|
76 | 76 | } |
77 | 77 | //gender |
78 | 78 | if (0 == $row['roft']) { |
79 | - $gender = '<img src="assets/images/male.gif"> ' . strtr(_MA_PEDIGREE_FLD_MALE, ['[male]' => $moduleConfig['male']]); |
|
79 | + $gender = '<img src="assets/images/male.gif"> '.strtr(_MA_PEDIGREE_FLD_MALE, ['[male]' => $moduleConfig['male']]); |
|
80 | 80 | } else { |
81 | - $gender = '<img src="assets/images/female.gif"> ' . strtr(_MA_PEDIGREE_FLD_FEMA, ['[female]' => $moduleConfig['female']]); |
|
81 | + $gender = '<img src="assets/images/female.gif"> '.strtr(_MA_PEDIGREE_FLD_FEMA, ['[female]' => $moduleConfig['female']]); |
|
82 | 82 | } |
83 | 83 | //Sire |
84 | 84 | if (0 != $row['father']) { |
85 | - $querysire = 'SELECT naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id=' . $row['father']; |
|
85 | + $querysire = 'SELECT naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id='.$row['father']; |
|
86 | 86 | $ressire = $GLOBALS['xoopsDB']->query($querysire); |
87 | 87 | while (false !== ($rowsire = $GLOBALS['xoopsDB']->fetchArray($ressire))) { |
88 | - $sire = '<img src="assets/images/male.gif"><a href="dog.php?id=' . $row['father'] . '">' . stripslashes($rowsire['naam']) . '</a>'; |
|
88 | + $sire = '<img src="assets/images/male.gif"><a href="dog.php?id='.$row['father'].'">'.stripslashes($rowsire['naam']).'</a>'; |
|
89 | 89 | } |
90 | 90 | } else { |
91 | - $sire = '<img src="assets/images/male.gif"><a href="seldog.php?curval=' . $row['id'] . '&gend=0&letter=A">' . _MA_PEDIGREE_UNKNOWN . '</a>'; |
|
91 | + $sire = '<img src="assets/images/male.gif"><a href="seldog.php?curval='.$row['id'].'&gend=0&letter=A">'._MA_PEDIGREE_UNKNOWN.'</a>'; |
|
92 | 92 | } |
93 | 93 | //Dam |
94 | 94 | if (0 != $row['mother']) { |
95 | - $querydam = 'SELECT naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id=' . $row['mother']; |
|
95 | + $querydam = 'SELECT naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id='.$row['mother']; |
|
96 | 96 | $resdam = $GLOBALS['xoopsDB']->query($querydam); |
97 | 97 | while (false !== ($rowdam = $GLOBALS['xoopsDB']->fetchArray($resdam))) { |
98 | - $dam = '<img src="assets/images/female.gif"><a href="dog.php?id=' . $row['mother'] . '">' . stripslashes($rowdam['naam']) . '</a>'; |
|
98 | + $dam = '<img src="assets/images/female.gif"><a href="dog.php?id='.$row['mother'].'">'.stripslashes($rowdam['naam']).'</a>'; |
|
99 | 99 | } |
100 | 100 | } else { |
101 | - $dam = '<img src="assets/images/female.gif"><a href="seldog.php?curval=' . $row['id'] . '&gend=1&letter=A">' . _MA_PEDIGREE_UNKNOWN . '</a>'; |
|
101 | + $dam = '<img src="assets/images/female.gif"><a href="seldog.php?curval='.$row['id'].'&gend=1&letter=A">'._MA_PEDIGREE_UNKNOWN.'</a>'; |
|
102 | 102 | } |
103 | 103 | //picture |
104 | 104 | if ('' != $row['foto']) { |
105 | - $picture = '<img src=' . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['foto'] . '_400.jpeg>'; |
|
105 | + $picture = '<img src='.PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$row['foto'].'_400.jpeg>'; |
|
106 | 106 | } else { |
107 | - $picture = '<a href="update.php?id=' . $row['id'] . '&fld=pc">' . _MA_PEDIGREE_UNKNOWN . '</a>'; |
|
107 | + $picture = '<a href="update.php?id='.$row['id'].'&fld=pc">'._MA_PEDIGREE_UNKNOWN.'</a>'; |
|
108 | 108 | } |
109 | 109 | //inbred precentage |
110 | 110 | if ('' == $row['coi']) { |
111 | 111 | if (0 != $row['father'] && 0 != $row['mother']) { |
112 | - $inbred = '<a href="coi.php?s=' . $row['father'] . '&d=' . $row['mother'] . '&dogid=' . $row['id'] . '&detail=1">' . strtr(_MA_PEDIGREE_COI_WAIT, ['[animalType]' => $moduleConfig['animalType']]) . '</a>'; |
|
112 | + $inbred = '<a href="coi.php?s='.$row['father'].'&d='.$row['mother'].'&dogid='.$row['id'].'&detail=1">'.strtr(_MA_PEDIGREE_COI_WAIT, ['[animalType]' => $moduleConfig['animalType']]).'</a>'; |
|
113 | 113 | } else { |
114 | 114 | $inbred = _MA_PEDIGREE_COI_MORE; |
115 | 115 | } |
116 | 116 | } else { |
117 | - $inbred = '<a href="coi.php?s=' . $row['father'] . '&d=' . $row['mother'] . '&dogid=' . $row['id'] . '&detail=1" title="' . strtr(_MA_PEDIGREE_COI_WAIT, ['[animalType]' => $moduleConfig['animalType']]) . '">' . $row['coi'] . ' %</a>'; |
|
117 | + $inbred = '<a href="coi.php?s='.$row['father'].'&d='.$row['mother'].'&dogid='.$row['id'].'&detail=1" title="'.strtr(_MA_PEDIGREE_COI_WAIT, ['[animalType]' => $moduleConfig['animalType']]).'">'.$row['coi'].' %</a>'; |
|
118 | 118 | } |
119 | 119 | //brothers and sisters |
120 | 120 | $bas = Pedigree\Utility::bas($id, $row['father'], $row['mother']); |
@@ -137,46 +137,46 @@ discard block |
||
137 | 137 | //name |
138 | 138 | $items[] = [ |
139 | 139 | 'header' => _MA_PEDIGREE_FLD_NAME, |
140 | - 'data' => '<a href="pedigree.php?pedid=' . $row['id'] . '">' . $naam . '</a> (click to view pedigree)', |
|
141 | - 'edit' => '<a href="update.php?id=' . $row['id'] . "&fld=nm\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
140 | + 'data' => '<a href="pedigree.php?pedid='.$row['id'].'">'.$naam.'</a> (click to view pedigree)', |
|
141 | + 'edit' => '<a href="update.php?id='.$row['id']."&fld=nm\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
142 | 142 | ]; |
143 | 143 | if ('1' == $moduleConfig['ownerbreeder']) { |
144 | 144 | //owner |
145 | 145 | $items[] = [ |
146 | 146 | 'header' => _MA_PEDIGREE_FLD_OWNE, |
147 | 147 | 'data' => $eig, |
148 | - 'edit' => '<a href="update.php?id=' . $row['id'] . "&fld=ow\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
148 | + 'edit' => '<a href="update.php?id='.$row['id']."&fld=ow\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
149 | 149 | ]; |
150 | 150 | //breeder |
151 | 151 | $items[] = [ |
152 | 152 | 'header' => _MA_PEDIGREE_FLD_BREE, |
153 | 153 | 'data' => $fok, |
154 | - 'edit' => '<a href="update.php?id=' . $row['id'] . "&fld=br\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
154 | + 'edit' => '<a href="update.php?id='.$row['id']."&fld=br\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
155 | 155 | ]; |
156 | 156 | } |
157 | 157 | //gender |
158 | 158 | $items[] = [ |
159 | 159 | 'header' => _MA_PEDIGREE_FLD_GEND, |
160 | 160 | 'data' => $gender, |
161 | - 'edit' => '<a href="update.php?id=' . $row['id'] . "&fld=sx\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
161 | + 'edit' => '<a href="update.php?id='.$row['id']."&fld=sx\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
162 | 162 | ]; |
163 | 163 | //sire |
164 | 164 | $items[] = [ |
165 | 165 | 'header' => strtr(_MA_PEDIGREE_FLD_FATH, ['[father]' => $moduleConfig['father']]), |
166 | 166 | 'data' => $sire, |
167 | - 'edit' => '<a href="seldog.php?curval=' . $row['id'] . "&gend=0&letter=A\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
167 | + 'edit' => '<a href="seldog.php?curval='.$row['id']."&gend=0&letter=A\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
168 | 168 | ]; |
169 | 169 | //dam |
170 | 170 | $items[] = [ |
171 | 171 | 'header' => strtr(_MA_PEDIGREE_FLD_MOTH, ['[mother]' => $moduleConfig['mother']]), |
172 | 172 | 'data' => $dam, |
173 | - 'edit' => '<a href="seldog.php?curval=' . $row['id'] . "&gend=1&letter=A\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
173 | + 'edit' => '<a href="seldog.php?curval='.$row['id']."&gend=1&letter=A\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
174 | 174 | ]; |
175 | 175 | //picture |
176 | 176 | $items[] = [ |
177 | 177 | 'header' => _MA_PEDIGREE_FLD_PICT, |
178 | 178 | 'data' => $picture, |
179 | - 'edit' => '<a href="update.php?id=' . $row['id'] . "&fld=pc\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a><a href=\"dog.php?id=" . $row['id'] . "&delpicture=true\"><img src=' " . $pathIcon16 . "/delete.png' border='0' alt=_DELETE title=_DELETE></a>" |
|
179 | + 'edit' => '<a href="update.php?id='.$row['id']."&fld=pc\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a><a href=\"dog.php?id=".$row['id']."&delpicture=true\"><img src=' ".$pathIcon16."/delete.png' border='0' alt=_DELETE title=_DELETE></a>" |
|
180 | 180 | ]; |
181 | 181 | |
182 | 182 | //userdefined fields |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | $items[] = [ |
203 | 203 | 'header' => $userField->getSetting('FieldName'), |
204 | 204 | 'data' => $fieldObject->showValue(), |
205 | - 'edit' => '<a href="update.php?id=' . $row['id'] . '&fld=' . $iValue . "\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
205 | + 'edit' => '<a href="update.php?id='.$row['id'].'&fld='.$iValue."\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>" |
|
206 | 206 | ]; |
207 | 207 | } |
208 | 208 | } |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | if ('1' == $moduleConfig['proversion']) { |
256 | 256 | $items[] = [ |
257 | 257 | 'header' => 'Inbred Pedigree', |
258 | - 'data' => '<a href="mpedigree.php?pedid=' . $row['id'] . '">Inbreeding pedigree</a>', |
|
258 | + 'data' => '<a href="mpedigree.php?pedid='.$row['id'].'">Inbreeding pedigree</a>', |
|
259 | 259 | 'edit' => '' |
260 | 260 | ]; |
261 | 261 | } |
@@ -268,13 +268,13 @@ discard block |
||
268 | 268 | $xoopsTpl->assign('dogs', $dogs); |
269 | 269 | $xoopsTpl->assign('columns', $columns); |
270 | 270 | $xoopsTpl->assign('numofcolumns', $numofcolumns); |
271 | -$xoopsTpl->assign('nummatch', $numMatch . ' Animals found.'); |
|
271 | +$xoopsTpl->assign('nummatch', $numMatch.' Animals found.'); |
|
272 | 272 | |
273 | 273 | //bas |
274 | 274 | $xoopsTpl->assign('dogs1', $dogs1); |
275 | 275 | $xoopsTpl->assign('columns1', $columns1); |
276 | 276 | $xoopsTpl->assign('numofcolumns1', $numofcolumns1); |
277 | -$xoopsTpl->assign('nummatch1', $nummatch1 . ' Animals found.'); |
|
277 | +$xoopsTpl->assign('nummatch1', $nummatch1.' Animals found.'); |
|
278 | 278 | |
279 | 279 | //both pups and bas |
280 | 280 | $xoopsTpl->assign('width', 100 / $numofcolumns); |
@@ -293,5 +293,5 @@ discard block |
||
293 | 293 | $xoopsTpl->assign('delete', _DELETE); |
294 | 294 | |
295 | 295 | //comments and footer |
296 | -include XOOPS_ROOT_PATH . '/include/comment_view.php'; |
|
297 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
296 | +include XOOPS_ROOT_PATH.'/include/comment_view.php'; |
|
297 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | $form = 'The following animals have been found in your database with a slah. Any escape characters have been removed.<hr>'; |
4 | -$queryString = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE naam LIKE '%\'%'"; |
|
4 | +$queryString = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE naam LIKE '%\'%'"; |
|
5 | 5 | $result = $GLOBALS['xoopsDB']->query($queryString); |
6 | 6 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
7 | - $form .= '<a href="pedigree.php?pedid=' . $row['id'] . '">' . $row['naam'] . '</a><br>'; |
|
8 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' SET naam = "' . stripslashes($row['naam']) . "\" WHERE id = '" . $row['id'] . "'"; |
|
7 | + $form .= '<a href="pedigree.php?pedid='.$row['id'].'">'.$row['naam'].'</a><br>'; |
|
8 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' SET naam = "'.stripslashes($row['naam'])."\" WHERE id = '".$row['id']."'"; |
|
9 | 9 | $GLOBALS['xoopsDB']->queryF($sql); |
10 | 10 | } |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | $form = 'This is an example of a userquery.<br><br>Shown below are the animals in your database that have a picture.<hr>'; |
4 | -$sql = 'SELECT id, naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE foto != ''"; |
|
4 | +$sql = 'SELECT id, naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE foto != ''"; |
|
5 | 5 | $result = $GLOBALS['xoopsDB']->query($sql); |
6 | 6 | $countpic = 0; |
7 | 7 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
8 | - $form .= '<a href="pedigree.php?pedid=' . $row['id'] . '">' . $row['naam'] . '</a><br>'; |
|
8 | + $form .= '<a href="pedigree.php?pedid='.$row['id'].'">'.$row['naam'].'</a><br>'; |
|
9 | 9 | ++$countpic; |
10 | 10 | } |
11 | -$form .= '<hr>There are a total of ' . $countpic . ' animals with a picture'; |
|
11 | +$form .= '<hr>There are a total of '.$countpic.' animals with a picture'; |