@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | use Xmf\Request; |
| 22 | 22 | |
| 23 | 23 | //require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
| 24 | -require_once __DIR__ . '/header.php'; |
|
| 24 | +require_once __DIR__.'/header.php'; |
|
| 25 | 25 | $moduleDirName = basename(__DIR__); |
| 26 | 26 | xoops_loadLanguage('main', $moduleDirName); |
| 27 | -require_once __DIR__ . '/include/config.php'; |
|
| 28 | -require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php'; |
|
| 27 | +require_once __DIR__.'/include/config.php'; |
|
| 28 | +require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php'; |
|
| 29 | 29 | $dogid = Request::getInt('dogid', 0, 'GET'); |
| 30 | 30 | |
| 31 | 31 | //create data and variables |
@@ -68,21 +68,21 @@ discard block |
||
| 68 | 68 | mfm.NAAM as mfm_naam, |
| 69 | 69 | mmm.Id as mmm_id, |
| 70 | 70 | mmm.NAAM as mmm_naam |
| 71 | -FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' d |
|
| 72 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' f ON d.father = f.Id |
|
| 73 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' m ON d.mother = m.Id |
|
| 74 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' ff ON f.father = ff.Id |
|
| 75 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fff ON ff.father = fff.Id |
|
| 76 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' ffm ON ff.mother = ffm.Id |
|
| 77 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mf ON m.father = mf.Id |
|
| 78 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mff ON mf.father = mff.Id |
|
| 79 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mfm ON mf.mother = mfm.Id |
|
| 80 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fm ON f.mother = fm.Id |
|
| 81 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fmf ON fm.father = fmf.Id |
|
| 82 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fmm ON fm.mother = fmm.Id |
|
| 83 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mm ON m.mother = mm.Id |
|
| 84 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mmf ON mm.father = mmf.Id |
|
| 85 | -LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " mmm ON mm.mother = mmm.Id |
|
| 71 | +FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' d |
|
| 72 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' f ON d.father = f.Id |
|
| 73 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' m ON d.mother = m.Id |
|
| 74 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' ff ON f.father = ff.Id |
|
| 75 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fff ON ff.father = fff.Id |
|
| 76 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' ffm ON ff.mother = ffm.Id |
|
| 77 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mf ON m.father = mf.Id |
|
| 78 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mff ON mf.father = mff.Id |
|
| 79 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mfm ON mf.mother = mfm.Id |
|
| 80 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fm ON f.mother = fm.Id |
|
| 81 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fmf ON fm.father = fmf.Id |
|
| 82 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fmm ON fm.mother = fmm.Id |
|
| 83 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mm ON m.mother = mm.Id |
|
| 84 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mmf ON mm.father = mmf.Id |
|
| 85 | +LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree')." mmm ON mm.mother = mmm.Id |
|
| 86 | 86 | where d.Id=$dogid"; |
| 87 | 87 | |
| 88 | 88 | $result = $GLOBALS['xoopsDB']->query($queryString); |
@@ -90,8 +90,8 @@ discard block |
||
| 90 | 90 | echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 91 | 91 | <html><head> |
| 92 | 92 | <meta http-equiv="Content-Type" content="text/html"> |
| 93 | - <meta name="AUTHOR" content="' . $GLOBALS['xoopsConfig']['sitename'] . '"> |
|
| 94 | - <meta name="COPYRIGHT" content="Copyright (c) 2018 by ' . $GLOBALS['xoopsConfig']['sitename'] . '"> |
|
| 93 | + <meta name="AUTHOR" content="' . $GLOBALS['xoopsConfig']['sitename'].'"> |
|
| 94 | + <meta name="COPYRIGHT" content="Copyright (c) 2018 by ' . $GLOBALS['xoopsConfig']['sitename'].'"> |
|
| 95 | 95 | <meta name="GENERATOR" content="XOOPS Pedigree database"> |
| 96 | 96 | </head> |
| 97 | 97 | <body bgcolor="#ffffff" text="#000000" onload="window.print()"> |
@@ -122,15 +122,15 @@ discard block |
||
| 122 | 122 | . stripslashes($row['d_naam']) |
| 123 | 123 | . "\n"; |
| 124 | 124 | if ('' != $row['d_foto']) { |
| 125 | - echo " <br><img src='" . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['d_foto'] . "_150.jpeg' width='150px;'>"; |
|
| 125 | + echo " <br><img src='".PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$row['d_foto']."_150.jpeg' width='150px;'>"; |
|
| 126 | 126 | } |
| 127 | - echo " </td>\n" . " <!-- father -->\n" . " <td width='25%' rowspan='4'>\n" . " {$male}" . stripslashes($row['f_naam']) . "\n"; |
|
| 127 | + echo " </td>\n"." <!-- father -->\n"." <td width='25%' rowspan='4'>\n"." {$male}".stripslashes($row['f_naam'])."\n"; |
|
| 128 | 128 | if ('' != $row['f_foto']) { |
| 129 | - echo " <br><img src='" . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['f_foto'] . "_150.jpeg' width='150px;'>\n"; |
|
| 129 | + echo " <br><img src='".PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$row['f_foto']."_150.jpeg' width='150px;'>\n"; |
|
| 130 | 130 | } |
| 131 | - echo " </td>\n" . " <!-- father father -->\n" . " <td width='25%' rowspan='2'>\n" . " {$male}" . stripslashes($row['ff_naam']) . "\n"; |
|
| 131 | + echo " </td>\n"." <!-- father father -->\n"." <td width='25%' rowspan='2'>\n"." {$male}".stripslashes($row['ff_naam'])."\n"; |
|
| 132 | 132 | if ('' != $row['ff_foto']) { |
| 133 | - echo " <br><img src='" . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['ff_foto'] . "_150.jpeg' width='150px;'>\n"; |
|
| 133 | + echo " <br><img src='".PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$row['ff_foto']."_150.jpeg' width='150px;'>\n"; |
|
| 134 | 134 | } |
| 135 | 135 | echo " </td>\n" |
| 136 | 136 | . " <!-- father father father -->\n" |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | . stripslashes($row['fm_naam']) |
| 156 | 156 | . "\n"; |
| 157 | 157 | if ('' != $row['fm_foto']) { |
| 158 | - echo " <br><img src='" . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['fm_foto'] . "_150.jpeg' width='150px;'>\n"; |
|
| 158 | + echo " <br><img src='".PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$row['fm_foto']."_150.jpeg' width='150px;'>\n"; |
|
| 159 | 159 | } |
| 160 | 160 | echo " </td>\n" |
| 161 | 161 | . " <!-- father mother father -->\n" |
@@ -180,11 +180,11 @@ discard block |
||
| 180 | 180 | . stripslashes($row['m_naam']) |
| 181 | 181 | . "\n"; |
| 182 | 182 | if ('' != $row['m_foto']) { |
| 183 | - echo " <br><img src='" . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['m_foto'] . "_150.jpeg' width='150px;'>\n"; |
|
| 183 | + echo " <br><img src='".PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$row['m_foto']."_150.jpeg' width='150px;'>\n"; |
|
| 184 | 184 | } |
| 185 | - echo " </td>\n" . " <!- mother father -->\n" . " <td width='25%' rowspan='2'>\n" . " {$male}" . stripslashes($row['mf_naam']) . "\n"; |
|
| 185 | + echo " </td>\n"." <!- mother father -->\n"." <td width='25%' rowspan='2'>\n"." {$male}".stripslashes($row['mf_naam'])."\n"; |
|
| 186 | 186 | if ('' != $row['mf_foto']) { |
| 187 | - echo " <br><img src='" . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['mf_foto'] . "_150.jpeg' width='150px;'>\n"; |
|
| 187 | + echo " <br><img src='".PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$row['mf_foto']."_150.jpeg' width='150px;'>\n"; |
|
| 188 | 188 | } |
| 189 | 189 | echo " </td>\n" |
| 190 | 190 | . " <!-- mother father father -->\n" |
@@ -27,8 +27,8 @@ 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'; |
|
| 30 | +require_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
| 31 | +require_once __DIR__.'/header.php'; |
|
| 32 | 32 | //require_once $rootPath . '/include/cp_functions.php'; |
| 33 | 33 | //require_once $rootPath . '/include/cp_header.php'; |
| 34 | 34 | //require_once $rootPath . '/class/xoopsformloader.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'>", |