} for ($i = 0; $i < count($p31_list); $i++) { $option = " \t\t<option value=\"" . $p31_list[$i] . "\""; if ($tab_idx["p31"] != "" && $tab_idx["p31"] == $p31_list[$i]) { $option .= " selected"; } echo $option . ">" . ucfirst(label_item($p31_list[$i], $l)) . "</option>\n"; } ?> </select> <?php $txt_crit = ""; foreach ($tab_idx as $key => $value) { if ($value != "" && $key != "p31") { $txt_crit .= "<label for=\"{$key}\"><span class=\"libelle_criteres\">" . translate($l, str_replace("p", "", $key)) . " :</span></label> "; $txt_crit .= txt_prop(0, $value, $l, "normal", 0, 0); $txt_crit .= "\t\t<input type=\"checkbox\" value=\"{$value}\" name=\"{$key}\" id=\"{$key}\" class=\"crit_sel\" checked=\"checked\" onChange=\"document.getElementById('form').submit()\"/>"; } } if ($q != "") { $txt_crit .= "<span class=\"libelle_criteres\">" . translate($l, "Wikidata") . " :</span> <a href=\"https://www.wikidata.org/wiki/Q" . $q . "\" class=\"externe\">Q" . $q . "</a>"; } if ($txt_crit != "") { echo "<span class=\"criteres\" >" . $txt_crit . "</span>"; } ?> </div> <?php if ($mode == 1) { echo "<div id=\"miss_props\">";
<title><?php foreach ($tab_idx as $key => $value) { if ($value != "") { echo txt_prop(0, $value, $l, "normal", 0, 0) . " - "; } } ?> Crotos</title> <meta name="description" content="Crotos<?php foreach ($tab_idx as $key => $value) { if ($value != "") { echo " - " . txt_prop(0, $value, $l, "normal", 0, 0); } } $txt_res = ""; if ($num_rows < 2) { $txt_res .= $num_rows . " " . mb_ucfirst(translate($l, "result")); } elseif ($num_rows <= $nb) { $txt_res .= $num_rows_ec . " " . mb_ucfirst(translate($l, "results")); } else { if ($rand_sel) { $txt_res .= $num_rows . " " . mb_ucfirst(translate($l, "results")); } else { $txt_res .= mb_ucfirst(translate($l, "results")) . " " . ($deb + 1) . " - " . ($deb + $num_rows_ec) . " " . translate($l, "of") . " " . $num_rows; } } echo " - " . $txt_res; ?> " />
function data_qwd($qwd, $row) { global $lg, $tab_check, $link, $h_thumb; $tab_lb = array("lb0" => $qwd, "lb18" => "", "lb373" => "", "lb1" => "", "lb2" => "", "lb170" => "", "lb571" => "", "lb31" => "", "lb186" => "", "lb195" => "", "lb217" => "", "lb276" => "", "lb179" => "", "lb3" => "", "lb973" => "", "lb727" => "", "lb347" => "", "lb1212" => "", "lb214" => "", "lb350" => "", "url_img" => "", "wp_links" => ""); if ($row == 0) { $tab_lb["lb1"] = label($qwd, $lg); if ($tab_lb["lb1"] == $qwd) { $tab_lb["lb1"] = ""; } } else { $id = $row['id']; if ($tab_check["c31"] == "1") { $tab_lb["lb31"] = txt_prop($id, 31, $lg, "normal", false, false); } $tab_lb["lb1"] = label_item($qwd, $lg); if ($tab_check["c2"] == "1") { $tab_lb["lb2"] = alias_item($qwd, $lg); } if ($tab_check["c170"] == "1") { $tab_lb["lb170"] = creators($id, $lg); } if ($tab_check["c571"] == "1") { $year1 = $row['year1']; $year2 = $row['year1']; if (!is_null($row['year1'])) { $tab_lb["lb571"] .= $row['year1']; if (!is_null($row['year2']) && $row['year1'] != $row['year2']) { $tab_lb["lb571"] .= " – " . $row['year2']; } if ($row['b_date'] == 1) { $tab_lb["lb571"] .= " (~)"; } } } if ($tab_check["c186"] == "1") { $tab_lb["lb186"] = txt_prop($id, 186, $lg, "normal", false, false); } if ($tab_check["c195"] == "1") { $tab_lb["lb195"] = txt_prop($id, 195, $lg, "listlink", false, false); } if ($tab_check["c217"] == "1") { $tab_lb["lb217"] = $row['P217']; } if ($tab_check["c276"] == "1") { $tab_lb["lb276"] = txt_prop($id, 276, $lg, "normal", false, false); } if ($tab_check["c179"] == "1") { $tab_lb["lb179"] = txt_prop($id, 179, $lg, "normal", false, false); } if ($tab_check["c973"] == "1") { $tab_lb["lb973"] = $row['link']; } if ($tab_check["c727"] == "1") { $tab_lb["lb727"] = $row['P727']; } if ($tab_check["c347"] == "1") { $tab_lb["lb347"] = $row['P347']; } if ($tab_check["c1212"] == "1") { $tab_lb["lb1212"] = $row['P1212']; } if ($tab_check["c214"] == "1") { $tab_lb["lb214"] = $row['P214']; } if ($tab_check["c350"] == "1") { $tab_lb["lb350"] = $row['P350']; } if ($tab_check["c18"] == "1") { if (intval($row['P18']) != 0) { $sql = "SELECT P18, width, height from commons_img WHERE id=" . $row['P18']; $rep2 = mysqli_query($link, $sql); $data2 = mysqli_fetch_assoc($rep2); $img = str_replace(" ", "_", $data2['P18']); $digest = md5($img); $folder = $digest[0] . '/' . $digest[0] . $digest[1] . '/' . urlencode($img); $w_thumb = floor(intval($data2['width']) / intval($data2['height']) * $h_thumb); $thumb = "http://upload.wikimedia.org/wikipedia/commons/thumb/" . $folder . "/" . $w_thumb . "px-" . urlencode($img); if (substr($img, -3) == "svg") { $thumb .= ".png"; } $tab_lb["url_img"] = "https://commons.wikimedia.org/wiki/File:" . urlencode($img); $tab_lb["lb18"] = "\t<a href=\"" . $tab_lb["url_img"] . "\" title=\"https://commons.wikimedia.org/wiki/File:" . urlencode($img) . "\"><img src=\"" . $thumb . "\" alt=\"" . str_replace("\"", "\\\"", $tab_lb["lb1"]) . "\" /></a>"; } } if ($tab_check["c373"] == "1") { $tab_lb["lb373"] = $row['P373']; } if ($tab_check["c3"] == "1") { $sql = "SELECT page,lg from label_page WHERE qwd=" . $qwd . " AND page!='' ORDER BY lg "; $rep2 = mysqli_query($link, $sql); $num_rows = mysqli_num_rows($rep2); if ($num_rows > 0) { $cpt2 = 0; $lg_of = ""; while ($data2 = mysqli_fetch_assoc($rep2)) { $cpt2++; if ($data2['lg'] != $lg_of) { if ($cpt2 != 1) { $tab_lb["lb3"] .= ", "; $tab_lb["wp_links"] .= ", "; } $tab_lb["lb3"] .= " <a href=\"https://" . $data2['lg'] . ".wikipedia.org/wiki/" . $data2['page'] . "\">[" . $data2['lg'] . "]</a>"; $tab_lb["wp_links"] .= "https://" . $data2['lg'] . ".wikipedia.org/wiki/" . $data2['page']; } $lg_of = $data2['lg']; } } } } return $tab_lb; }
$collection = txt_prop($id_artw, 195, $l); $loc_link = local_link($id_artw, 195, $l); if ($loc_link == "") { $loc_link = local_link($id_artw, 276, $l); } $type = txt_prop($id_artw, 31, $l, "normal", 0); $material = txt_prop($id_artw, 186, $l); $series = txt_prop($id_artw, 179, $l); $partof = txt_prop($id_artw, 361, $l); $mouvement = txt_prop($id_artw, 135, $l); $genre = txt_prop($id_artw, 136, $l); $depicts = txt_prop($id_artw, 180, $l); $based = txt_prop($id_artw, 144, $l); $subject = txt_prop($id_artw, 921, $l); $inspired = txt_prop($id_artw, 941, $l); $pendant = txt_prop($id_artw, 1639, $l); $p18 = $data['P18']; $commons_artist = ""; $commons_credit = ""; $license = ""; $thumb = ""; $thumb_h = ""; $width_h = 0; $large = ""; if ($p18 != 0) { $sql = "select * from commons_img where id=" . $p18; $rep18 = mysqli_query($link, $sql); if (mysqli_num_rows($rep18) != 0) { $data_p18 = mysqli_fetch_assoc($rep18); $p18_str = $data_p18['P18']; $commons_artist = $data_p18['commons_artist'];