PageSourceSearch

https://sego.es/scripts/viewer.js?v=1027432696

js sego.es collected 2026-09-24 09:42:34 UTC 6,394 bytes, 110 lines download raw bytes

1function viewer(documento) {
2    $.get("db/traeDocumento.php",
3            {"documento": documento},
4            function (json) {
5                if (json == "") {
6                    alert("Debe registrarse o darse de alta para acceder a este contenido.");//alert("FICHERO NO EXISTENTE O NO ESTÁ AUTORIZADO PARA ACCEDER A ESTE FICHERO");
7                    //exit;
8                }
9                var dades = jQuery.parseJSON(json);
10
11                $("#url").val((dades["path"].substr(-3)).toLowerCase());
12
13                if(dades["tipo"] == 9){
14                    $("#viewer img").hide();
15                    $("#viewer").show("slow", function () {
16                        $("#viewer iframe").attr("src", "db/galeriaFotos.php?path=../imagenes/" + dades["path"]);
17                        $("#viewer iframe").width($("#viewer").width());
18                        $("#viewer iframe").show("slow", function () {
19                            $("#viewer iframe").css("height", ($("#viewer").height() - 40) + "px");
20                            $("#viewer iframe").css("width", $("#viewer").width() + "px");
21                        });
22                        window.scrollTo(0, 0);
23                    });
24
25                } else {
26                    if (dades["url"] != "") {
27                        window.open(dades["url"]);
28                    } else {
29                        $.get("db/devuelveDirectorio.php",
30                                {
31                                    "gap": dades["gap"],
32                                    "autonomia": dades["autonomia"],
33                                    "titulo": dades["titulo"],
34                                    "gedeon": 0,
35                                    "tipo": dades["tipo"],
36                                    "curso": dades["curso"],
37                                    "noauth": dades["no_auth"],
38                                    "path": dades["path"]
39                               },
40                                function (json) {
41                                    var dir = jQuery.parseJSON(json).substr(3);
42                                    var file = dades["path"].substr(dades["path"].lastIndexOf("/") + 1);
43                                    $("#viewer").height($(document).height());
44                                    //alert((dades["path"].substr(-3)).toLowerCase());
45                                    switch ((dades["path"].substr(-3)).toLowerCase()) {
46                                        case "mp4":
47                                            $("#viewer img").hide();
48                                            $("#viewer iframe").hide();
49                                            $("#viewer").show("slow", function () {
50                                                $("#viewer video").attr("src", dir + file);
51                                                $("#viewer video").css("width", "75%");
52                                                $("#viewer video").css("top", "100px");
53                                                //$("#viewer video").width($("#viewer").width());
54                                                $("#viewer video").get(0).load();
55                                                $("#viewer video").get(0).play();
56                                            });
57                                            break;
58                                        case "jpg":
59                                        case "jpeg":
60                                        case "png":
61                                            $("#viewer video").hide();
62                                            $("#viewer iframe").hide();
63                                            $("#viewer").show("slow", function () {
64                                                $("#viewer img").attr("src", dir + file);
65                                                $("#viewer img").width($("#viewer").width());
66                                                $("#viewer img").show("slow", function () {
67                                                    $("#viewer img").css("height", $("#viewer").css("height") + "px");
68                                                    $("#viewer img").css("width", $("#viewer").width() + "px");
69                                                });
70                                            });
71                                            break;
72                                        case "pdf":
73                                            $("#viewer video").hide();
74                                            $("#viewer img").hide();
75									if(dades["tipo"] == 4){/*alert("dades tipo 4");*/
76											console.log("ent ty 4");
77											window.open("https://sego.es/" + dir + file,"_blank");
78
79										}else{
80
81                                            $("#viewer").show("slow", function () {
82												if(dades["tipo"] == 41){
83													$("#viewer iframe").attr("src", "db/download3.php?path=../" + dir);
84												}else{
85                                                $("#viewer iframe").attr("src", "db/download3.php?path=../" + dir + file);
86												}
87                                                $("#viewer iframe").width($("#viewer").width());
88                                                $("#viewer iframe").show("slow", function () {
89                                                    $("#viewer iframe").css("height", ($("#viewer").height() - 40) + "px");
90                                                    $("#viewer iframe").css("width", $("#viewer").width() + "px");
91                                                });
92                                            });
93																				}
94																				
95                                            break;
96                                        default:
97                                            //window.open("db/download2.php?path=../" + dir + file);
98                                            window.open("../" + dir + file);
99                                            break;
100                                    }
101                                    window.scrollTo(0, 0);
102                                });
103                    }
104                }
105            });
106}
107
108function amagaViewer() {
109    $("#viewer").hide("slow");
110}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.