-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcases_bin.php
More file actions
executable file
·176 lines (115 loc) · 6.35 KB
/
cases_bin.php
File metadata and controls
executable file
·176 lines (115 loc) · 6.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?php
// Start the session
session_start();
$assets = explode("_",strtolower(basename(__FILE__)))[0];
include('assets_header.php');
?>
<!-- <script type="text/javascript" src="js/assets.js" type="text/javascript"></script> -->
<div class="container_MenuAssetscardsAndCards">
<?php include('assets_menu.php');?>
<div id="div_cards" style="background-color:var(--color-grey2);">
<ul id="cards" class="cards">
<?php
// echo "<br><br><br><br><br><br><br><br>";
foreach (getAssetsList($path_assets) as $value){
$number = explode("_", $value)[1];
$data_asset = $number;
$id_asset = "#".$number;
$id_img = "".$asset."_".$number."_bg";
$id_progressBar = "".$asset."_".$number."_progressBar";
$id_percent = "".$asset."_".$number."_progressPercent";
$id_divAsset = "div_".$asset."_".$number;
$title_asset = $id_name[$number];
$id_btnUploadCase = "btn_upload_".$asset."_".$number."_bg";
$name_btnUploadCase = $id_img;
$bg_img_default = "data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==";
$bg_img = $bg_img_default;
$path_case = $path_assets."/".$asset."_".$number;
$pop = "pop";
$fileBG = glob($path_case.'/*');
$bg_img_original = $fileBG[0]."?". filemtime($fileBG[0]);
$data_date = date("Y-m-d H:i:s",filemtime($fileBG[0]));
$path_case_thumb = $path_assets."/".$asset."_".$number."thumbs";
foreach ($auth_cases_ext as $ext) {
$src_img = $path_case."/".$asset."_".$number."_bg.".$ext;
$bg_img_jpg = $src_img."?". filemtime($path_case."/".$asset."_".$number."_bg.".$ext);
$src_img_thumb = $path_case."/thumbs/".$asset."_".$number."_bg.".$ext;
$bg_img_thumb_jpg = $src_img."?". filemtime($path_case."/thumbs/".$asset."_".$number."_bg.".$ext);
if (file_exists($src_img_thumb)) {
$bg_img = $bg_img_thumb_jpg;
$pop = "pop";
} else {
if (file_exists($src_img)) {
$bg_img = $bg_img_jpg;
$bg_img_original = $bg_img_jpg;
}
}
}
echo "<li class='LI-cards__item fiche' data-length='100' data-price='16' data-asset='".$data_asset."' data-date='".$data_date."'>";
echo "<div class='card fiche_card'>";
echo "<div class='div__cardImage'>";
echo "<img width='1000px' id-asset='".$number."' id='".$id_img."' class='card__image card__image--fence image_fiche ".$pop."' src='".$bg_img."' src_high='".$bg_img_original."'></img>"; // todo better
echo "<div id='".$id_progressBar."' class='progressBar'><div id='".$id_percent."' class='percent'>0%</div></div>";
echo "<div id='".$id_divAsset."' class='title-asset' droppable='$droppable'>";
echo "<label class='$class_btn_upload_fileContainer'>";
echo $id_asset.' | '.$title_asset;
if($assets=="cases"){
echo "<input id='".$id_btnUploadCase."' type='file' class='input_asset' name='".$name_btnUploadCase."' onchange=\"uploadIMG_assets(this,'".$path_assets."','".$asset."','".$max_filesize_octets."');\"/>";
}
echo "</label>";
echo "</div>";
echo "</div>";
echo "<div class='card__content' style='background:none;width:inherit;'>";
echo "<div class='card__title'>[Seq 4,Seq 1]</div>";
echo "<div class='card__subtitle'>";
echo "<span class='length'> 100M </span>";
echo "<span class='price'> 16€ </span>";
echo "<span class='date'> ".$data_date." </span>";
echo "</div>";
echo "<p class='card__text'>
This is the shorthand for fe second and third parameters (flex-shrink and flex-basis) are optional. Default is 0 1 auto.
This is the shorthand for fe second and third parameters (flex-shrink and flex-basis) are optional. Default is 0 1 auto.
</p>";
echo "<button class='btn-editCard'><i class='fa fa-pencil-square-o fa-2x' aria-hidden='true'></i></button>";
echo "</div>";
echo "</div>";
echo "</li>";
} ?>
</ul>
</div>
<div id="treeview" class="treeview" style="width:100%;padding-top:1px;display:block;color:white;"></div>
</div>
<!-- Creates the bootstrap modal where the image will appear -->
<!-- <div class="modal fade" id="imagemodalDES" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Image preview</h4>
</div>
<div class="modal-body">
<img src="" id="imagepreview" style="widthX: 400px; heightX: 264px;" >
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div> -->
<script type="text/javascript" src="js/assets.js" type="text/javascript"></script>
<script type="text/javascript">
$(".pop").on("click", function() {
$('#imagepreview').attr('src', $(this).attr('src_high')); // here asign the image to the modal when the user click the enlarge link
// $('#imagemodal').modal('show'); // imagemodal is the id attribute assigned to the bootstrap modal, then i use the show function
// window.parent.
var modal = parent.document.getElementById('iframe_modal');
// var modal = parent.document.getElementById('imagemodal');
$(modal).show(); // imagemodal is the id attribute assigned to the bootstrap modal, then i use the show function
// $('#imagemodal').modal('show');
url = "assets_edit.php?id="+$(this).attr('id-asset');
$(modal).attr("src", url);
});
</script>
<?php
// include('assets_footer.php');
?>