@@ -17,5 +17,5 @@ |
||
17 | 17 | * @author XOOPS Development Team |
18 | 18 | */ |
19 | 19 | |
20 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
21 | -include XOOPS_ROOT_PATH . '/include/comment_post.php'; |
|
20 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
21 | +include XOOPS_ROOT_PATH.'/include/comment_post.php'; |
@@ -6,13 +6,13 @@ discard block |
||
6 | 6 | ini_set('memory_limit', '32M'); |
7 | 7 | |
8 | 8 | //require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
9 | -require_once __DIR__ . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | $moduleDirName = basename(__DIR__); |
11 | 11 | xoops_loadLanguage('main', $moduleDirName); |
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 | $GLOBALS['xoopsOption']['template_main'] = 'pedigree_coi.tpl'; |
15 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
15 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
16 | 16 | |
17 | 17 | //get module configuration |
18 | 18 | /** @var XoopsModuleHandler $moduleHandler */ |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | $empty = []; // an empty array |
72 | -$sql1 = 'SELECT id, father, mother, roft FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id '; |
|
72 | +$sql1 = 'SELECT id, father, mother, roft FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id '; |
|
73 | 73 | |
74 | 74 | // input data arrays: |
75 | 75 | $IDs = $empty; |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $j = min($im, 6); |
217 | 217 | $c = $couls[$j]; |
218 | 218 | $first = 0; |
219 | - echo '<font color=' . $c . ' size="+2"><b>*' . $i . '*</b></font>'; |
|
219 | + echo '<font color='.$c.' size="+2"><b>*'.$i.'*</b></font>'; |
|
220 | 220 | } |
221 | 221 | } |
222 | 222 | |
@@ -242,10 +242,10 @@ discard block |
||
242 | 242 | $ani = set_name($ID); |
243 | 243 | $name = $ani[1]; |
244 | 244 | $name = $ID; |
245 | - $cell_content = Pedigree\Utility::showParent($name) . $nl; |
|
245 | + $cell_content = Pedigree\Utility::showParent($name).$nl; |
|
246 | 246 | } |
247 | 247 | $rowspan = 1 << ($depth - $gen); |
248 | - echo '<td rowspan=' . $rowspan . ' align="center" class="' . $class . '">' . $cell_content . "</td>$nl"; |
|
248 | + echo '<td rowspan='.$rowspan.' align="center" class="'.$class.'">'.$cell_content."</td>$nl"; |
|
249 | 249 | if ($gen < $depth) { |
250 | 250 | $sire = 0; |
251 | 251 | if ($ind || 0 == $gen) { |
@@ -282,26 +282,26 @@ discard block |
||
282 | 282 | . _('Sire / Dam') |
283 | 283 | . '</th>'; |
284 | 284 | if ($depth >= 2) { |
285 | - echo '<th>' . _('Grandparents') . '</th>' . $nl; |
|
285 | + echo '<th>'._('Grandparents').'</th>'.$nl; |
|
286 | 286 | } |
287 | 287 | if ($depth >= 3) { |
288 | - echo '<th>' . _('Great-Grandparents') . '</th>' . $nl; |
|
288 | + echo '<th>'._('Great-Grandparents').'</th>'.$nl; |
|
289 | 289 | } |
290 | 290 | if ($depth >= 4) { |
291 | - echo '<th>3xGr. P.</th>' . $nl; |
|
291 | + echo '<th>3xGr. P.</th>'.$nl; |
|
292 | 292 | } |
293 | 293 | if ($depth >= 5) { |
294 | - echo '<th>4xGr. P.</th>' . $nl; |
|
294 | + echo '<th>4xGr. P.</th>'.$nl; |
|
295 | 295 | } |
296 | 296 | if ($depth >= 6) { |
297 | - echo '<th>5xGr. P.</th>' . $nl; |
|
297 | + echo '<th>5xGr. P.</th>'.$nl; |
|
298 | 298 | } |
299 | 299 | if ($depth >= 7) { |
300 | - echo '<th>6xGr. P.</th>' . $nl; |
|
300 | + echo '<th>6xGr. P.</th>'.$nl; |
|
301 | 301 | } |
302 | 302 | echo '</tr><tr>'; |
303 | 303 | output_animal(0, 0, '0'); /* output the sketch pedigree */ |
304 | - echo $nl . '</tr></table>' . $nl . '<p>' . $nl; |
|
304 | + echo $nl.'</tr></table>'.$nl.'<p>'.$nl; |
|
305 | 305 | |
306 | 306 | return 0; |
307 | 307 | } |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | /* $list1 = join (' ', $listall) ; $list2 = join ('+', $listnew) ; |
436 | 436 | echo "<!-- P ($nloop) $list1/$list2 -->$nl" ; */ |
437 | 437 | // $listall = array_merge($listall, $listnew); |
438 | - $listall[] = $listnew; |
|
438 | + $listall[] = $listnew; |
|
439 | 439 | } |
440 | 440 | // $listall = call_user_func_array('array_merge', $listall); |
441 | 441 | $listall = array_merge(...$listall); |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | $listnew = array_diff(array_unique($liste), $listall); |
488 | 488 | // $list1 = join (' ', $listall) ; $list2 = join ('+', $listnew) ; echo "M ($nloop) $list1/$list2 $nl" ; |
489 | 489 | // $listall = array_merge($listall, $listnew); |
490 | - $listall[] = $listnew; |
|
490 | + $listall[] = $listnew; |
|
491 | 491 | } |
492 | 492 | // $listall = call_user_func_array('array_merge', $listall); |
493 | 493 | $listall = array_merge(...$listall); |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | ++$nbtot; |
689 | 689 | } |
690 | 690 | if ($j > $nloop - 10) { |
691 | - $listing .= "Loop $j: Animal #$s " . $IDs[$s] . $nl; |
|
691 | + $listing .= "Loop $j: Animal #$s ".$IDs[$s].$nl; |
|
692 | 692 | } |
693 | 693 | } |
694 | 694 | if (false !== ($d = $mothers[$i])) { |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | ++$nbtot; |
704 | 704 | } |
705 | 705 | if ($j > $nloop - 10) { |
706 | - $listing .= "Loop $j: Animal #$d " . $IDs[$d] . $nl; |
|
706 | + $listing .= "Loop $j: Animal #$d ".$IDs[$d].$nl; |
|
707 | 707 | } |
708 | 708 | } |
709 | 709 | } |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | $ID = (int)$ID; |
742 | 742 | $ani = []; |
743 | 743 | if ($ID) { |
744 | - $sqlQuery = 'SELECT id, naam, roft FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE id = '$ID'"; |
|
744 | + $sqlQuery = 'SELECT id, naam, roft FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE id = '$ID'"; |
|
745 | 745 | $queryResult = $GLOBALS['xoopsDB']->query($sqlQuery); |
746 | 746 | $ani = $GLOBALS['xoopsDB']->fetchBoth($queryResult); |
747 | 747 | /* |
@@ -782,7 +782,7 @@ discard block |
||
782 | 782 | return ' '; |
783 | 783 | } |
784 | 784 | $e = str_replace(' ', '+', $ems); |
785 | - $res = '<a href="#" style="text-decoration:none;" onClick="' . "window.open('http://www.somali.asso.fr/eros/decode_ems.php?$e'," . "'', 'resizable=no,width=570,height=370')" . '"' . "><b>$ems</b></a>"; |
|
785 | + $res = '<a href="#" style="text-decoration:none;" onClick="'."window.open('http://www.somali.asso.fr/eros/decode_ems.php?$e',"."'', 'resizable=no,width=570,height=370')".'"'."><b>$ems</b></a>"; |
|
786 | 786 | |
787 | 787 | return $res; |
788 | 788 | } |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | if (is_array($animal)) { |
805 | 805 | list($ID, $name, $sex, $hd, $ems) = $animal; |
806 | 806 | } |
807 | - $sqlQuery = 'SELECT SQL_CACHE COUNT(id) FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " where father = '$ID' or mother = '$ID'"; |
|
807 | + $sqlQuery = 'SELECT SQL_CACHE COUNT(id) FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." where father = '$ID' or mother = '$ID'"; |
|
808 | 808 | $queryResult = $GLOBALS['xoopsDB']->queryF($sqlQuery); |
809 | 809 | $nb = $GLOBALS['xoopsDB']->fetchBoth($queryResult); |
810 | 810 | $nb_children = $nb[0]; |
@@ -812,7 +812,7 @@ discard block |
||
812 | 812 | $nb_children = _MA_PEDIGREE_COI_NO; |
813 | 813 | } |
814 | 814 | //$dogid = $animal[0]; |
815 | - $content .= '<tr><td><a href="dog.php?id=' . $ID . '">' . stripslashes($name) . '</a>'; |
|
815 | + $content .= '<tr><td><a href="dog.php?id='.$ID.'">'.stripslashes($name).'</a>'; |
|
816 | 816 | // if ($nb_enf == 0) echo ' ø' ; |
817 | 817 | if ($val) { |
818 | 818 | $content .= $val; |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | if (0 == $sex) { |
824 | 824 | $geslacht = '<img src="assets/images/male.gif">'; |
825 | 825 | } |
826 | - $content .= '</td><td>' . $geslacht . '</td><td>' . $nb_children . _MA_PEDIGREE_COI_OFF . '</td></tr>'; |
|
826 | + $content .= '</td><td>'.$geslacht.'</td><td>'.$nb_children._MA_PEDIGREE_COI_OFF.'</td></tr>'; |
|
827 | 827 | |
828 | 828 | return $content; |
829 | 829 | } |
@@ -873,7 +873,7 @@ discard block |
||
873 | 873 | } |
874 | 874 | |
875 | 875 | if (isset($a)) { |
876 | - $sqlQuery = 'SELECT id, father, mother, roft FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE id = '$a'"; |
|
876 | + $sqlQuery = 'SELECT id, father, mother, roft FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE id = '$a'"; |
|
877 | 877 | $queryResult = $GLOBALS['xoopsDB']->query($sqlQuery); |
878 | 878 | $rowhond = $GLOBALS['xoopsDB']->fetchBoth($queryResult); |
879 | 879 | $a = $rowhond['id']; |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | $xoopsTpl->assign('pcontent', strtr(_MA_PEDIGREE_COI_CKRI_CT, ['[animalType]' => $moduleConfig['animalType']])); |
889 | 889 | |
890 | 890 | if (!$s && !$d) { |
891 | - $error = _MA_PEDIGREE_COI_SPANF1 . $a . _MA_PEDIGREE_COI_SPANF2; |
|
891 | + $error = _MA_PEDIGREE_COI_SPANF1.$a._MA_PEDIGREE_COI_SPANF2; |
|
892 | 892 | $xoopsTpl->assign('COIerror', $error); |
893 | 893 | } |
894 | 894 | |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | $codec2 = 0; |
923 | 923 | } |
924 | 924 | |
925 | -$sqlQuery = 'SELECT father, mother, roft FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE id = '$codec1'"; |
|
925 | +$sqlQuery = 'SELECT father, mother, roft FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE id = '$codec1'"; |
|
926 | 926 | $queryResult = $GLOBALS['xoopsDB']->query($sqlQuery); |
927 | 927 | $rowhond = $GLOBALS['xoopsDB']->fetchBoth($queryResult); |
928 | 928 | $a1 = $rowhond['id']; |
@@ -932,7 +932,7 @@ discard block |
||
932 | 932 | |
933 | 933 | // echo "sqlquery:".$sqlQuery."<br>"; |
934 | 934 | |
935 | -$sqlQuery = 'SELECT father, mother, roft FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE id = '$codec2'"; |
|
935 | +$sqlQuery = 'SELECT father, mother, roft FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE id = '$codec2'"; |
|
936 | 936 | $queryResult = $GLOBALS['xoopsDB']->query($sqlQuery); |
937 | 937 | $rowhond = $GLOBALS['xoopsDB']->fetchBoth($queryResult); |
938 | 938 | $a2 = $rowhond['id']; |
@@ -949,7 +949,7 @@ discard block |
||
949 | 949 | $xoopsTpl->assign('COIerror', _MA_PEDIGREE_COI_SGPU); |
950 | 950 | } |
951 | 951 | |
952 | -$title = strtr(_MA_PEDIGREE_FLD_FATH, ['[father]' => $moduleConfig['father']]) |
|
952 | +$title = strtr(_MA_PEDIGREE_FLD_FATH, ['[father]' => $moduleConfig['father']]) |
|
953 | 953 | . ' (' |
954 | 954 | . stripslashes(Pedigree\Utility::showParent($codec2)) |
955 | 955 | . ')' |
@@ -970,10 +970,10 @@ discard block |
||
970 | 970 | ])); |
971 | 971 | |
972 | 972 | $de_cujus = 0; |
973 | -$sire_ID = Request::getInt('s', 0, 'GET');//$_GET['s']; |
|
974 | -$dam_ID = Request::getInt('d', 0, 'GET');//$_GET['d']; |
|
973 | +$sire_ID = Request::getInt('s', 0, 'GET'); //$_GET['s']; |
|
974 | +$dam_ID = Request::getInt('d', 0, 'GET'); //$_GET['d']; |
|
975 | 975 | |
976 | -$rec = 'SELECT id FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE father = '" . $sire_ID . "' AND mother = '" . $dam_ID . "' ORDER BY naam"; |
|
976 | +$rec = 'SELECT id FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE father = '".$sire_ID."' AND mother = '".$dam_ID."' ORDER BY naam"; |
|
977 | 977 | $result = $GLOBALS['xoopsDB']->query($rec); |
978 | 978 | $content = ''; |
979 | 979 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
@@ -1063,14 +1063,14 @@ discard block |
||
1063 | 1063 | } |
1064 | 1064 | } |
1065 | 1065 | } |
1066 | -$w = _MA_PEDIGREE_COI_TVI . ' ' . $w; |
|
1066 | +$w = _MA_PEDIGREE_COI_TVI.' '.$w; |
|
1067 | 1067 | |
1068 | 1068 | $nb_all = 0; |
1069 | 1069 | count_all(0, 0); // count all ascendants in flat tree |
1070 | 1070 | |
1071 | 1071 | $nbmax = (2 << $nb_gen) - 2; |
1072 | -$asctc = _MA_PEDIGREE_COI_ASTC . $nb_gen . _MA_PEDIGREE_COI_ASTCGEN . $nbmax . ')'; |
|
1073 | -$ascuni = _MA_PEDIGREE_COI_ASDKA . $nb_gen . _MA_PEDIGREE_COI_ASGEN; |
|
1072 | +$asctc = _MA_PEDIGREE_COI_ASTC.$nb_gen._MA_PEDIGREE_COI_ASTCGEN.$nbmax.')'; |
|
1073 | +$ascuni = _MA_PEDIGREE_COI_ASDKA.$nb_gen._MA_PEDIGREE_COI_ASGEN; |
|
1074 | 1074 | $xoopsTpl->assign('ASCtitle', _MA_PEDIGREE_COI_ACTIT); |
1075 | 1075 | $xoopsTpl->assign('ASCtc', $asctc); |
1076 | 1076 | $xoopsTpl->assign('ASCuni', $ascuni); |
@@ -1097,7 +1097,7 @@ discard block |
||
1097 | 1097 | ])); |
1098 | 1098 | $xoopsTpl->assign('COIcoi', _MA_PEDIGREE_COI_COI); |
1099 | 1099 | $dogid = Request::getInt('dogid', 0, 'GET'); |
1100 | -$query = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' SET coi=' . $f1 . ' WHERE id = ' . $dogid; |
|
1100 | +$query = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' SET coi='.$f1.' WHERE id = '.$dogid; |
|
1101 | 1101 | $GLOBALS['xoopsDB']->queryF($query); |
1102 | 1102 | arsort($deltaf); |
1103 | 1103 | $j = 1; |
@@ -1111,7 +1111,7 @@ discard block |
||
1111 | 1111 | $animal = set_name($IDs[$i]); |
1112 | 1112 | $name = $animal[1]; |
1113 | 1113 | if (!$name) { |
1114 | - $name = $i . ' [' . $IDs[$i] . ']'; |
|
1114 | + $name = $i.' ['.$IDs[$i].']'; |
|
1115 | 1115 | } |
1116 | 1116 | if ($v > 0.0001 && $v < 1.0) { |
1117 | 1117 | $dogs[] = ['id' => $code, 'name' => stripslashes($name), 'coi' => 100 * $v]; |
@@ -1189,9 +1189,9 @@ discard block |
||
1189 | 1189 | $xoopsTpl->assign('SSDbsd', strtr(_MA_PEDIGREE_COI_SDDbsd, ['[father]' => $moduleConfig['father'], '[mother]' => $moduleConfig['mother']])); |
1190 | 1190 | $xoopsTpl->assign('SSDcor', $SSDcor); |
1191 | 1191 | |
1192 | -$xoopsTpl->assign('SSDS', _MA_PEDIGREE_COI_COI . _MA_PEDIGREE_FROM . strtr(_MA_PEDIGREE_FLD_FATH, ['[father]' => $moduleConfig['father']])); |
|
1192 | +$xoopsTpl->assign('SSDS', _MA_PEDIGREE_COI_COI._MA_PEDIGREE_FROM.strtr(_MA_PEDIGREE_FLD_FATH, ['[father]' => $moduleConfig['father']])); |
|
1193 | 1193 | $xoopsTpl->assign('SSDsire', $SSDsire); |
1194 | -$xoopsTpl->assign('SSDM', _MA_PEDIGREE_COI_COI . _MA_PEDIGREE_FROM . strtr(_MA_PEDIGREE_FLD_MOTH, ['[mother]' => $moduleConfig['mother']])); |
|
1194 | +$xoopsTpl->assign('SSDM', _MA_PEDIGREE_COI_COI._MA_PEDIGREE_FROM.strtr(_MA_PEDIGREE_FLD_MOTH, ['[mother]' => $moduleConfig['mother']])); |
|
1195 | 1195 | $xoopsTpl->assign('SSDdam', $SSDdam); |
1196 | 1196 | |
1197 | 1197 | // echo "SSDsire : ".$SSDsire."<br>"; |
@@ -1213,4 +1213,4 @@ discard block |
||
1213 | 1213 | $xoopsTpl->assign('explain', _MA_PEDIGREE_EXPLAIN); |
1214 | 1214 | |
1215 | 1215 | //comments and footer |
1216 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
1216 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | $moduleDirName = basename(__DIR__); |
28 | 28 | $mydirpath = dirname(__DIR__); |
29 | 29 | |
30 | -require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
31 | -require_once __DIR__ . '/header.php'; |
|
32 | -require_once $rootPath . '/include/cp_functions.php'; |
|
33 | -require_once $rootPath . '/include/cp_header.php'; |
|
30 | +require_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
31 | +require_once __DIR__.'/header.php'; |
|
32 | +require_once $rootPath.'/include/cp_functions.php'; |
|
33 | +require_once $rootPath.'/include/cp_header.php'; |
|
34 | 34 | //require_once $rootPath . '/class/xoopsformloader.php'; |
35 | 35 | |
36 | 36 | //require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | //require_once __DIR__ . '/header.php'; |
42 | 42 | |
43 | 43 | // Include any common code for this module. |
44 | -require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php'; |
|
44 | +require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php'; |
|
45 | 45 | //require_once(XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/include/css.php"); |
46 | 46 | |
47 | 47 | // Get all HTTP post or get parameters into global variables that are prefixed with "param_" |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | pedigree_main(); |
74 | 74 | |
75 | 75 | //include XOOPS_ROOT_PATH . "/footer.php"; |
76 | -include __DIR__ . '/footer.php'; |
|
76 | +include __DIR__.'/footer.php'; |
|
77 | 77 | |
78 | 78 | // |
79 | 79 | // Displays the "Main" tab of the module |
@@ -94,29 +94,29 @@ discard block |
||
94 | 94 | $querystring = 'SELECT '; |
95 | 95 | |
96 | 96 | foreach ($qarray as $key) { |
97 | - $querystring .= $key . '.id as ' . $key . '_id, '; |
|
98 | - $querystring .= $key . '.naam as ' . $key . '_naam, '; |
|
99 | - $querystring .= $key . '.mother as ' . $key . '_mother, '; |
|
100 | - $querystring .= $key . '.father as ' . $key . '_father, '; |
|
101 | - $querystring .= $key . '.roft as ' . $key . '_roft, '; |
|
102 | - $querystring .= $key . '.foto as ' . $key . '_foto, '; |
|
97 | + $querystring .= $key.'.id as '.$key.'_id, '; |
|
98 | + $querystring .= $key.'.naam as '.$key.'_naam, '; |
|
99 | + $querystring .= $key.'.mother as '.$key.'_mother, '; |
|
100 | + $querystring .= $key.'.father as '.$key.'_father, '; |
|
101 | + $querystring .= $key.'.roft as '.$key.'_roft, '; |
|
102 | + $querystring .= $key.'.foto as '.$key.'_foto, '; |
|
103 | 103 | } |
104 | 104 | |
105 | - $querystring .= 'mmm.coi as mmm_coi FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' d |
|
106 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' f ON d.father = f.id |
|
107 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' m ON d.mother = m.id |
|
108 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' ff ON f.father = ff.id |
|
109 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fff ON ff.father = fff.id |
|
110 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' ffm ON ff.mother = ffm.id |
|
111 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mf ON m.father = mf.id |
|
112 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mff ON mf.father = mff.id |
|
113 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mfm ON mf.mother = mfm.id |
|
114 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fm ON f.mother = fm.id |
|
115 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fmf ON fm.father = fmf.id |
|
116 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fmm ON fm.mother = fmm.id |
|
117 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mm ON m.mother = mm.id |
|
118 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mmf ON mm.father = mmf.id |
|
119 | - LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " mmm ON mm.mother = mmm.id |
|
105 | + $querystring .= 'mmm.coi as mmm_coi FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' d |
|
106 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' f ON d.father = f.id |
|
107 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' m ON d.mother = m.id |
|
108 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' ff ON f.father = ff.id |
|
109 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fff ON ff.father = fff.id |
|
110 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' ffm ON ff.mother = ffm.id |
|
111 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mf ON m.father = mf.id |
|
112 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mff ON mf.father = mff.id |
|
113 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mfm ON mf.mother = mfm.id |
|
114 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fm ON f.mother = fm.id |
|
115 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fmf ON fm.father = fmf.id |
|
116 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fmm ON fm.mother = fmm.id |
|
117 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mm ON m.mother = mm.id |
|
118 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mmf ON mm.father = mmf.id |
|
119 | + LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree')." mmm ON mm.mother = mmm.id |
|
120 | 120 | WHERE d.id={$id}"; |
121 | 121 | |
122 | 122 | $result = $GLOBALS['xoopsDB']->query($querystring); |
@@ -126,17 +126,17 @@ discard block |
||
126 | 126 | //create array for animal (and all parents) |
127 | 127 | foreach ($qarray as $key) { |
128 | 128 | $d[$key] = [ |
129 | - 'id' => $row[$key . '_id'], |
|
130 | - 'name' => stripslashes($row[$key . '_naam']), |
|
131 | - 'mother' => $row[$key . '_mother'], |
|
132 | - 'father' => $row[$key . '_father'], |
|
133 | - 'roft' => $row[$key . '_roft'], |
|
129 | + 'id' => $row[$key.'_id'], |
|
130 | + 'name' => stripslashes($row[$key.'_naam']), |
|
131 | + 'mother' => $row[$key.'_mother'], |
|
132 | + 'father' => $row[$key.'_father'], |
|
133 | + 'roft' => $row[$key.'_roft'], |
|
134 | 134 | 'nhsb' => '' |
135 | 135 | ]; |
136 | - if ((3 != strlen($key) || (0 != $moduleConfig['lastimage'])) && ('' !== $row[$key . '_foto'])) { |
|
136 | + if ((3 != strlen($key) || (0 != $moduleConfig['lastimage'])) && ('' !== $row[$key.'_foto'])) { |
|
137 | 137 | //show image in last row of pedigree if image exists |
138 | - $d[$key]['photo'] = PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row[$key . '_foto'] . '_150.jpeg'; |
|
139 | - $d[$key]['photoBig'] = PEDIGREE_UPLOAD_URL . '/images/' . $row[$key . '_foto'] . '.jpeg'; |
|
138 | + $d[$key]['photo'] = PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$row[$key.'_foto'].'_150.jpeg'; |
|
139 | + $d[$key]['photoBig'] = PEDIGREE_UPLOAD_URL.'/images/'.$row[$key.'_foto'].'.jpeg'; |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | $d[$key]['overig'] = ''; |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | if ($userField->isActive() && $userField->inPedigree()) { |
154 | 154 | $fieldType = $userField->getSetting('FieldType'); |
155 | 155 | $fieldObj = new $fieldType($userField, $animal); |
156 | - $pedidata .= $fieldObj->showField() . '<br>'; |
|
156 | + $pedidata .= $fieldObj->showField().'<br>'; |
|
157 | 157 | } |
158 | 158 | $d[$key]['hd'] = $pedidata; |
159 | 159 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | //add data to smarty template |
164 | 164 | $GLOBALS['xoopsTpl']->assign([ |
165 | 165 | 'page_title' => stripslashes($row['d_naam']), |
166 | - 'd' => $d, //assign dog |
|
166 | + 'd' => $d, //assign dog |
|
167 | 167 | //assign config options |
168 | 168 | 'male' => "<img src='assets/images/male.gif'>", |
169 | 169 | 'female' => "<img src='assets/images/female.gif'>", |
@@ -6,21 +6,21 @@ discard block |
||
6 | 6 | |
7 | 7 | |
8 | 8 | //require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
9 | -require_once __DIR__ . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | xoops_loadLanguage('main', basename(dirname(__DIR__))); |
11 | 11 | |
12 | 12 | // Include any common code for this module. |
13 | -require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php'; |
|
13 | +require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php'; |
|
14 | 14 | |
15 | 15 | $GLOBALS['xoopsOption']['template_main'] = 'pedigree_update.tpl'; |
16 | 16 | |
17 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
17 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
18 | 18 | $xoopsTpl->assign('page_title', 'Pedigree database - Update details'); |
19 | 19 | |
20 | 20 | //check for access |
21 | 21 | $xoopsModule = XoopsModule::getByDirname($moduleDirName); |
22 | 22 | if (empty($GLOBALS['xoopsUser']) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser)) { |
23 | - redirect_header('javascript:history.go(-1)', 3, _NOPERM . '<br>' . _MA_PEDIGREE_REGIST); |
|
23 | + redirect_header('javascript:history.go(-1)', 3, _NOPERM.'<br>'._MA_PEDIGREE_REGIST); |
|
24 | 24 | } |
25 | 25 | // ( $xoopsUser->isAdmin($xoopsModule->mid() ) ) |
26 | 26 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $id = $_GET['id']; |
38 | 38 | */ |
39 | 39 | //query (find values for this owner/breeder (and format them)) |
40 | -$queryString = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' WHERE id=' . $id; |
|
40 | +$queryString = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' WHERE id='.$id; |
|
41 | 41 | $result = $GLOBALS['xoopsDB']->query($queryString); |
42 | 42 | |
43 | 43 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | //name |
47 | 47 | $naaml = htmlentities(stripslashes($row['lastname']), ENT_QUOTES); |
48 | 48 | $naamf = htmlentities(stripslashes($row['firstname']), ENT_QUOTES); |
49 | - $naam = $naaml . ', ' . $naamf; |
|
50 | - $namelink = '<a href="dog.php?id=' . $row['id'] . '">' . stripslashes($row['naam']) . '</a>'; |
|
49 | + $naam = $naaml.', '.$naamf; |
|
50 | + $namelink = '<a href="dog.php?id='.$row['id'].'">'.stripslashes($row['naam']).'</a>'; |
|
51 | 51 | //street |
52 | 52 | $street = stripslashes($row['streetname']); |
53 | 53 | //housenumber |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | //create form |
71 | -include XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
71 | +include XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
72 | 72 | $form = new \XoopsThemeForm($naam, 'updatedata', 'updatepage.php', 'post', true); |
73 | 73 | //hidden value current record owner |
74 | 74 | $form->addElement(new \XoopsFormHidden('dbuser', $dbuser)); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $form->addElement(new \XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360)); |
79 | 79 | //name last |
80 | 80 | if ('nl' === $fld || 'all' === $fld) { |
81 | - $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_OWN_LNAME . '</b>', 'naaml', $size = 50, $maxsize = 255, $value = $naaml)); |
|
81 | + $form->addElement(new \XoopsFormText('<b>'._MA_PEDIGREE_OWN_LNAME.'</b>', 'naaml', $size = 50, $maxsize = 255, $value = $naaml)); |
|
82 | 82 | $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner')); |
83 | 83 | $form->addElement(new \XoopsFormHidden('dbfield', 'lastname')); |
84 | 84 | $form->addElement(new \XoopsFormHidden('curvalnamel', $naaml)); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | //name first |
89 | 89 | if ('nf' === $fld || 'all' === $fld) { |
90 | - $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_OWN_FNAME . '</b>', 'naamf', $size = 50, $maxsize = 255, $value = $naamf)); |
|
90 | + $form->addElement(new \XoopsFormText('<b>'._MA_PEDIGREE_OWN_FNAME.'</b>', 'naamf', $size = 50, $maxsize = 255, $value = $naamf)); |
|
91 | 91 | $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner')); |
92 | 92 | $form->addElement(new \XoopsFormHidden('dbfield', 'firstname')); |
93 | 93 | $form->addElement(new \XoopsFormHidden('curvalnamef', $naamf)); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | } |
97 | 97 | //street |
98 | 98 | if ('st' === $fld || 'all' === $fld) { |
99 | - $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_STR . '</b>', 'street', $size = 50, $maxsize = 255, $value = $street)); |
|
99 | + $form->addElement(new \XoopsFormText('<b>'._MA_PEDIGREE_FLD_OWN_STR.'</b>', 'street', $size = 50, $maxsize = 255, $value = $street)); |
|
100 | 100 | $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner')); |
101 | 101 | $form->addElement(new \XoopsFormHidden('dbfield', 'streetname')); |
102 | 102 | $form->addElement(new \XoopsFormHidden('curvalstreet', $street)); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | } |
106 | 106 | //housenumber |
107 | 107 | if ('hn' === $fld || 'all' === $fld) { |
108 | - $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_HN . '</b>', 'housenumber', $size = 50, $maxsize = 255, $value = $housenumber)); |
|
108 | + $form->addElement(new \XoopsFormText('<b>'._MA_PEDIGREE_FLD_OWN_HN.'</b>', 'housenumber', $size = 50, $maxsize = 255, $value = $housenumber)); |
|
109 | 109 | $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner')); |
110 | 110 | $form->addElement(new \XoopsFormHidden('dbfield', 'housenumber')); |
111 | 111 | $form->addElement(new \XoopsFormHidden('curvalhousenumber', $housenumber)); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | } |
115 | 115 | //postcode |
116 | 116 | if ('pc' === $fld || 'all' === $fld) { |
117 | - $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_PC . '</b>', 'postcode', $size = 50, $maxsize = 255, $value = $postcode)); |
|
117 | + $form->addElement(new \XoopsFormText('<b>'._MA_PEDIGREE_FLD_OWN_PC.'</b>', 'postcode', $size = 50, $maxsize = 255, $value = $postcode)); |
|
118 | 118 | $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner')); |
119 | 119 | $form->addElement(new \XoopsFormHidden('dbfield', 'postcode')); |
120 | 120 | $form->addElement(new \XoopsFormHidden('curvalpostcode', $postcode)); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | } |
124 | 124 | //city |
125 | 125 | if ('ct' === $fld || 'all' === $fld) { |
126 | - $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_CITY . '</b>', 'city', $size = 50, $maxsize = 255, $value = $city)); |
|
126 | + $form->addElement(new \XoopsFormText('<b>'._MA_PEDIGREE_FLD_OWN_CITY.'</b>', 'city', $size = 50, $maxsize = 255, $value = $city)); |
|
127 | 127 | $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner')); |
128 | 128 | $form->addElement(new \XoopsFormHidden('dbfield', 'city')); |
129 | 129 | $form->addElement(new \XoopsFormHidden('curvalcity', $city)); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | } |
133 | 133 | //phonenumber |
134 | 134 | if ('pn' === $fld || 'all' === $fld) { |
135 | - $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_PN . '</b>', 'phonenumber', $size = 50, $maxsize = 255, $value = $phonenumber)); |
|
135 | + $form->addElement(new \XoopsFormText('<b>'._MA_PEDIGREE_FLD_OWN_PN.'</b>', 'phonenumber', $size = 50, $maxsize = 255, $value = $phonenumber)); |
|
136 | 136 | $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner')); |
137 | 137 | $form->addElement(new \XoopsFormHidden('dbfield', 'phonenumber')); |
138 | 138 | $form->addElement(new \XoopsFormHidden('curvalphonenumber', $phonenumber)); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | } |
142 | 142 | |
143 | 143 | if ('em' === $fld || 'all' === $fld) { |
144 | - $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_EMAIL . '</b>', 'email', $size = 50, $maxsize = 255, $value = $email)); |
|
144 | + $form->addElement(new \XoopsFormText('<b>'._MA_PEDIGREE_FLD_OWN_EMAIL.'</b>', 'email', $size = 50, $maxsize = 255, $value = $email)); |
|
145 | 145 | $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner')); |
146 | 146 | $form->addElement(new \XoopsFormHidden('dbfield', 'emailadres')); |
147 | 147 | $form->addElement(new \XoopsFormHidden('curvalemail', $email)); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | } |
151 | 151 | //website |
152 | 152 | if ('we' === $fld || 'all' === $fld) { |
153 | - $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_WEB . '</b>', 'web', $size = 50, $maxsize = 255, $value = $web)); |
|
153 | + $form->addElement(new \XoopsFormText('<b>'._MA_PEDIGREE_FLD_OWN_WEB.'</b>', 'web', $size = 50, $maxsize = 255, $value = $web)); |
|
154 | 154 | $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner')); |
155 | 155 | $form->addElement(new \XoopsFormHidden('dbfield', 'website')); |
156 | 156 | $form->addElement(new \XoopsFormHidden('curvalweb', $web)); |
@@ -166,4 +166,4 @@ discard block |
||
166 | 166 | $xoopsTpl->assign('form', $form->render()); |
167 | 167 | |
168 | 168 | //footer |
169 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
169 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -19,8 +19,8 @@ |
||
19 | 19 | |
20 | 20 | use XoopsModules\Pedigree; |
21 | 21 | |
22 | -require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
23 | -require_once __DIR__ . '/include/common.php'; |
|
22 | +require_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
23 | +require_once __DIR__.'/include/common.php'; |
|
24 | 24 | |
25 | 25 | /** @var Pedigree\Helper $helper */ |
26 | 26 | $helper = Pedigree\Helper::getInstance(); |
@@ -6,20 +6,20 @@ discard block |
||
6 | 6 | |
7 | 7 | |
8 | 8 | //require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
9 | -require_once __DIR__ . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | $moduleDirName = basename(__DIR__); |
11 | 11 | xoops_loadLanguage('main', $moduleDirName); |
12 | 12 | // Include any common code for this module. |
13 | -require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php'; |
|
13 | +require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php'; |
|
14 | 14 | |
15 | 15 | $GLOBALS['xoopsOption']['template_main'] = 'pedigree_delete.tpl'; |
16 | 16 | |
17 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
17 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
18 | 18 | |
19 | 19 | //check for access |
20 | 20 | $xoopsModule = XoopsModule::getByDirname($moduleDirName); |
21 | 21 | if (empty($GLOBALS['xoopsUser']) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser)) { |
22 | - redirect_header('javascript:history.go(-1)', 3, _NOPERM . '<br>' . _MA_PEDIGREE_REGIST); |
|
22 | + redirect_header('javascript:history.go(-1)', 3, _NOPERM.'<br>'._MA_PEDIGREE_REGIST); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | global $xoopsTpl, $xoopsDB, $xoopsUser; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $dogname = Request::getString('curname', '', 'post'); |
29 | 29 | |
30 | 30 | if (!empty($dogname)) { |
31 | - $queryString = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id=' . $dogid; |
|
31 | + $queryString = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id='.$dogid; |
|
32 | 32 | $result = $GLOBALS['xoopsDB']->query($queryString); |
33 | 33 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
34 | 34 | //check for edit rights |
@@ -43,14 +43,14 @@ discard block |
||
43 | 43 | } |
44 | 44 | } |
45 | 45 | if ('1' == $access) { |
46 | - $sql = 'INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash') . ' SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ".id='" . $dogid . "'"; |
|
46 | + $sql = 'INSERT INTO '.$GLOBALS['xoopsDB']->prefix('pedigree_trash').' SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').".id='".$dogid."'"; |
|
47 | 47 | $GLOBALS['xoopsDB']->query($sql); |
48 | - $delsql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE id ='" . $row['id'] . "'"; |
|
48 | + $delsql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE id ='".$row['id']."'"; |
|
49 | 49 | $GLOBALS['xoopsDB']->query($delsql); |
50 | 50 | if ('0' == $row['roft']) { |
51 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " SET father = '0' where father = '" . $row['id'] . "'"; |
|
51 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." SET father = '0' where father = '".$row['id']."'"; |
|
52 | 52 | } else { |
53 | - $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " SET mother = '0' where mother = '" . $row['id'] . "'"; |
|
53 | + $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." SET mother = '0' where mother = '".$row['id']."'"; |
|
54 | 54 | } |
55 | 55 | $GLOBALS['xoopsDB']->query($sql); |
56 | 56 | $ch = 1; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | if ($ch) { |
62 | 62 | redirect_header('index.php', 2, _MD_DATACHANGED); |
63 | 63 | } else { |
64 | - redirect_header('dog.php?id=' . $dogid, 1, 'ERROR!!'); |
|
64 | + redirect_header('dog.php?id='.$dogid, 1, 'ERROR!!'); |
|
65 | 65 | } |
66 | 66 | //footer |
67 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
67 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -6,21 +6,21 @@ discard block |
||
6 | 6 | |
7 | 7 | |
8 | 8 | //require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
9 | -require_once __DIR__ . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | $moduleDirName = basename(__DIR__); |
11 | 11 | xoops_loadLanguage('main', $moduleDirName); |
12 | 12 | // Include any common code for this module. |
13 | -require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php'; |
|
13 | +require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php'; |
|
14 | 14 | |
15 | 15 | $GLOBALS['xoopsOption']['template_main'] = 'pedigree_update.tpl'; |
16 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
16 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
17 | 17 | |
18 | 18 | $xoopsTpl->assign('page_title', 'Pedigree database - Update details'); |
19 | 19 | |
20 | 20 | //check for access |
21 | 21 | $xoopsModule = XoopsModule::getByDirname($moduleDirName); |
22 | 22 | if (empty($GLOBALS['xoopsUser']) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser)) { |
23 | - redirect_header('javascript:history.go(-1)', 3, _NOPERM . '<br>' . _MA_PEDIGREE_REGIST); |
|
23 | + redirect_header('javascript:history.go(-1)', 3, _NOPERM.'<br>'._MA_PEDIGREE_REGIST); |
|
24 | 24 | } |
25 | 25 | // ( $xoopsUser->isAdmin($xoopsModule->mid() ) ) |
26 | 26 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $configHandler = xoops_getHandler('config'); |
36 | 36 | $moduleConfig = $configHandler->getConfigsByCat(0, $module->getVar('mid')); |
37 | 37 | */ |
38 | -$helper = Pedigree\Helper::getInstance(false); |
|
38 | +$helper = Pedigree\Helper::getInstance(false); |
|
39 | 39 | $moduleConfig = $helper->getConfig(); |
40 | 40 | |
41 | 41 | $myts = \MyTextSanitizer::getInstance(); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | |
50 | 50 | //query (find values for this dog (and format them)) |
51 | -$queryString = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id=' . $id; |
|
51 | +$queryString = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id='.$id; |
|
52 | 52 | $result = $GLOBALS['xoopsDB']->query($queryString); |
53 | 53 | |
54 | 54 | while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) { |
@@ -56,48 +56,48 @@ discard block |
||
56 | 56 | $id = $row['id']; |
57 | 57 | //name |
58 | 58 | $naam = htmlentities(stripslashes($row['naam']), ENT_QUOTES); |
59 | - $namelink = '<a href="dog.php?id=' . $row['id'] . '">' . stripslashes($row['naam']) . '</a>'; |
|
59 | + $namelink = '<a href="dog.php?id='.$row['id'].'">'.stripslashes($row['naam']).'</a>'; |
|
60 | 60 | //owner |
61 | - $queryeig = 'SELECT id, lastname, firstname FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' WHERE id=' . $row['id_owner']; |
|
61 | + $queryeig = 'SELECT id, lastname, firstname FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' WHERE id='.$row['id_owner']; |
|
62 | 62 | $reseig = $GLOBALS['xoopsDB']->query($queryeig); |
63 | 63 | while (false !== ($roweig = $GLOBALS['xoopsDB']->fetchArray($reseig))) { |
64 | - $eig = '<a href="owner.php?ownid=' . $roweig['id'] . '">' . $roweig['firstname'] . ' ' . $roweig['lastname'] . '</a>'; |
|
64 | + $eig = '<a href="owner.php?ownid='.$roweig['id'].'">'.$roweig['firstname'].' '.$roweig['lastname'].'</a>'; |
|
65 | 65 | } |
66 | 66 | $curvaleig = $row['id_owner']; |
67 | 67 | //breeder |
68 | - $queryfok = 'SELECT id, lastname, firstname FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' WHERE id=' . $row['id_breeder']; |
|
68 | + $queryfok = 'SELECT id, lastname, firstname FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' WHERE id='.$row['id_breeder']; |
|
69 | 69 | $resfok = $GLOBALS['xoopsDB']->query($queryfok); |
70 | 70 | while (false !== ($rowfok = $GLOBALS['xoopsDB']->fetchArray($resfok))) { |
71 | - $fok = '<a href="owner.php?ownid=' . $rowfok['id'] . '">' . $rowfok['firstname'] . ' ' . $rowfok['lastname'] . '</a>'; |
|
71 | + $fok = '<a href="owner.php?ownid='.$rowfok['id'].'">'.$rowfok['firstname'].' '.$rowfok['lastname'].'</a>'; |
|
72 | 72 | } |
73 | 73 | $curvalfok = $row['id_breeder']; |
74 | 74 | //gender |
75 | 75 | if ('0' == $row['roft']) { |
76 | - $gender = '<img src="assets/images/male.gif"> ' . _MA_PEDIGREE_FLD_MALE; |
|
76 | + $gender = '<img src="assets/images/male.gif"> '._MA_PEDIGREE_FLD_MALE; |
|
77 | 77 | } else { |
78 | - $gender = '<img src="assets/images/female.gif"> ' . _MA_PEDIGREE_FLD_FEMA; |
|
78 | + $gender = '<img src="assets/images/female.gif"> '._MA_PEDIGREE_FLD_FEMA; |
|
79 | 79 | } |
80 | 80 | $curvalroft = $row['roft']; |
81 | 81 | //Sire |
82 | 82 | if (0 != $row['father']) { |
83 | - $querysire = 'SELECT naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id=' . $row['father']; |
|
83 | + $querysire = 'SELECT naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id='.$row['father']; |
|
84 | 84 | $ressire = $GLOBALS['xoopsDB']->query($querysire); |
85 | 85 | while (false !== ($rowsire = $GLOBALS['xoopsDB']->fetchArray($ressire))) { |
86 | - $sire = '<img src="assets/images/male.gif"><a href="dog.php?id=' . $row['father'] . '">' . stripslashes($rowsire['naam']) . '</a>'; |
|
86 | + $sire = '<img src="assets/images/male.gif"><a href="dog.php?id='.$row['father'].'">'.stripslashes($rowsire['naam']).'</a>'; |
|
87 | 87 | } |
88 | 88 | } |
89 | 89 | //Dam |
90 | 90 | if (0 != $row['mother']) { |
91 | - $querydam = 'SELECT naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id=' . $row['mother']; |
|
91 | + $querydam = 'SELECT naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id='.$row['mother']; |
|
92 | 92 | $resdam = $GLOBALS['xoopsDB']->query($querydam); |
93 | 93 | while (false !== ($rowdam = $GLOBALS['xoopsDB']->fetchArray($resdam))) { |
94 | - $dam = '<img src="assets/images/female.gif"><a href="dog.php?id=' . $row['mother'] . '">' . stripslashes($rowdam['naam']) . '</a>'; |
|
94 | + $dam = '<img src="assets/images/female.gif"><a href="dog.php?id='.$row['mother'].'">'.stripslashes($rowdam['naam']).'</a>'; |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | //picture |
98 | 98 | $picture = ''; |
99 | 99 | if ('' != $row['foto']) { |
100 | - $picture = '<img src=' . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['foto'] . '_400.jpeg>'; |
|
100 | + $picture = '<img src='.PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$row['foto'].'_400.jpeg>'; |
|
101 | 101 | $foto = $row['foto']; |
102 | 102 | } else { |
103 | 103 | $foto = ''; |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | //create form |
110 | -include XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
110 | +include XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
111 | 111 | $form = new \XoopsThemeForm($naam, 'updatedata', 'updatepage.php', 'post', true); |
112 | 112 | $form->setExtra("enctype='multipart/form-data'"); |
113 | 113 | //hidden value current record owner |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $form->addElement(new \XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360)); |
119 | 119 | //name |
120 | 120 | if ('nm' === $fld || 'all' === $fld) { |
121 | - $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_NAME . '</b>', 'naam', $size = 50, $maxsize = 255, $value = $naam)); |
|
121 | + $form->addElement(new \XoopsFormText('<b>'._MA_PEDIGREE_FLD_NAME.'</b>', 'naam', $size = 50, $maxsize = 255, $value = $naam)); |
|
122 | 122 | $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FLD_NAME_EX)); |
123 | 123 | $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_tree')); |
124 | 124 | $form->addElement(new \XoopsFormHidden('dbfield', 'naam')); |
@@ -126,12 +126,12 @@ discard block |
||
126 | 126 | } else { |
127 | 127 | //owner |
128 | 128 | if ('ow' === $fld || 'all' === $fld) { |
129 | - $owner_select = new \XoopsFormSelect('<b>' . _MA_PEDIGREE_FLD_OWNE . '</b>', $name = 'id_owner', $value = null, $size = 1, $multiple = false); |
|
130 | - $queryeig = 'SELECT id, lastname, firstname FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' ORDER BY `lastname`'; |
|
129 | + $owner_select = new \XoopsFormSelect('<b>'._MA_PEDIGREE_FLD_OWNE.'</b>', $name = 'id_owner', $value = null, $size = 1, $multiple = false); |
|
130 | + $queryeig = 'SELECT id, lastname, firstname FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' ORDER BY `lastname`'; |
|
131 | 131 | $reseig = $GLOBALS['xoopsDB']->query($queryeig); |
132 | 132 | $owner_select->addOption(0, $name = _MA_PEDIGREE_UNKNOWN); |
133 | 133 | while (false !== ($roweig = $GLOBALS['xoopsDB']->fetchArray($reseig))) { |
134 | - $owner_select->addOption($roweig['id'], $name = $roweig['lastname'] . ', ' . $roweig['firstname']); |
|
134 | + $owner_select->addOption($roweig['id'], $name = $roweig['lastname'].', '.$roweig['firstname']); |
|
135 | 135 | } |
136 | 136 | $form->addElement($owner_select); |
137 | 137 | $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FLD_OWNE_EX)); |
@@ -143,12 +143,12 @@ discard block |
||
143 | 143 | |
144 | 144 | //breeder |
145 | 145 | if ('br' === $fld || 'all' === $fld) { |
146 | - $breeder_select = new \XoopsFormSelect('<b>' . _MA_PEDIGREE_FLD_BREE . '</b>', $name = 'id_breeder', $value = null, $size = 1, $multiple = false); |
|
147 | - $queryfok = 'SELECT id, lastname, firstname FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' ORDER BY `lastname`'; |
|
146 | + $breeder_select = new \XoopsFormSelect('<b>'._MA_PEDIGREE_FLD_BREE.'</b>', $name = 'id_breeder', $value = null, $size = 1, $multiple = false); |
|
147 | + $queryfok = 'SELECT id, lastname, firstname FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' ORDER BY `lastname`'; |
|
148 | 148 | $resfok = $GLOBALS['xoopsDB']->query($queryfok); |
149 | 149 | $breeder_select->addOption(0, $name = _MA_PEDIGREE_UNKNOWN); |
150 | 150 | while (false !== ($rowfok = $GLOBALS['xoopsDB']->fetchArray($resfok))) { |
151 | - $breeder_select->addOption($rowfok['id'], $name = $rowfok['lastname'] . ', ' . $rowfok['firstname']); |
|
151 | + $breeder_select->addOption($rowfok['id'], $name = $rowfok['lastname'].', '.$rowfok['firstname']); |
|
152 | 152 | } |
153 | 153 | $form->addElement($breeder_select); |
154 | 154 | $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FLD_BREE_EX)); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | |
160 | 160 | //gender |
161 | 161 | if ('sx' === $fld || 'all' === $fld) { |
162 | - $gender_radio = new \XoopsFormRadio('<b>' . _MA_PEDIGREE_FLD_GEND . '</b>', 'roft', $value = null); |
|
162 | + $gender_radio = new \XoopsFormRadio('<b>'._MA_PEDIGREE_FLD_GEND.'</b>', 'roft', $value = null); |
|
163 | 163 | $gender_radio->addOptionArray(['0' => _MA_PEDIGREE_FLD_MALE, '1' => _MA_PEDIGREE_FLD_FEMA]); |
164 | 164 | $form->addElement($gender_radio); |
165 | 165 | $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FLD_GEND_EX)); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | $explain = $userField->getSetting('FieldExplanation'); |
201 | 201 | $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, $explain)); |
202 | 202 | $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_tree')); |
203 | - $form->addElement(new \XoopsFormHidden('dbfield', 'user' . $iValue)); |
|
203 | + $form->addElement(new \XoopsFormHidden('dbfield', 'user'.$iValue)); |
|
204 | 204 | } |
205 | 205 | } |
206 | 206 | } |
@@ -213,4 +213,4 @@ discard block |
||
213 | 213 | $xoopsTpl->assign('form', $form->render()); |
214 | 214 | |
215 | 215 | //footer |
216 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
216 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -2,13 +2,13 @@ discard block |
||
2 | 2 | // ------------------------------------------------------------------------- |
3 | 3 | |
4 | 4 | //require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
5 | -require_once __DIR__ . '/header.php'; |
|
5 | +require_once __DIR__.'/header.php'; |
|
6 | 6 | |
7 | 7 | $moduleDirName = basename(__DIR__); |
8 | 8 | xoops_loadLanguage('main', $moduleDirName); |
9 | 9 | |
10 | 10 | // Include any common code for this module. |
11 | -require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php'; |
|
11 | +require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php'; |
|
12 | 12 | |
13 | 13 | // Get all HTTP post or get parameters into global variables that are prefixed with "param_" |
14 | 14 | //import_request_variables("gp", "param_"); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | pedigree_main($pedid); |
29 | 29 | |
30 | 30 | //comments and footer |
31 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
31 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
32 | 32 | |
33 | 33 | // |
34 | 34 | // Displays the "Main" tab of the module |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | mmm.nhsb as mmm_nhsb, |
151 | 151 | mmm.foto as mmm_foto, |
152 | 152 | mmm.hd as mmm_hd |
153 | - FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " d |
|
153 | + FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree')." d |
|
154 | 154 | LEFT JOIN xoops_pedigree f ON d.father = f.id |
155 | 155 | LEFT JOIN xoops_pedigree m ON d.mother = m.id |
156 | 156 | LEFT JOIN xoops_pedigree ff ON f.father = ff.id |
@@ -61,7 +61,7 @@ |
||
61 | 61 | |
62 | 62 | $title = $this->isNew() ? sprintf(_AM_PEDIGREE_PEDIGREE_TRASH_ADD) : sprintf(_AM_PEDIGREE_PEDIGREE_TRASH_EDIT); |
63 | 63 | |
64 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
64 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
65 | 65 | |
66 | 66 | $form = new \XoopsThemeForm($title, 'form', $action, 'post', true); |
67 | 67 | $form->setExtra('enctype="multipart/form-data"'); |