File indexing completed on 2024-12-29 05:24:49
0001 <?php 0002 /** 0003 * ocs-webserver 0004 * 0005 * Copyright 2016 by pling GmbH. 0006 * 0007 * This file is part of ocs-webserver. 0008 * 0009 * This program is free software: you can redistribute it and/or modify 0010 * it under the terms of the GNU Affero General Public License as 0011 * published by the Free Software Foundation, either version 3 of the 0012 * License, or (at your option) any later version. 0013 * 0014 * This program is distributed in the hope that it will be useful, 0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 * GNU Affero General Public License for more details. 0018 * 0019 * You should have received a copy of the GNU Affero General Public License 0020 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 **/ 0022 ?> 0023 0024 <style type="text/css"> 0025 0026 0027 div.jtable-main-container table.jtable tbody > tr > td{ 0028 vertical-align: top; 0029 border-left:0px; 0030 border-right:0px; 0031 font-size: small; 0032 } 0033 div.jtable-main-container table.jtable{ 0034 border: 0px; 0035 } 0036 div.jtable-main-container table.jtable th{ 0037 border: 0px; 0038 background: none; 0039 font-weight: bold; 0040 } 0041 0042 #TableContainer 0043 { 0044 padding: 20px; 0045 } 0046 #titleheader{ 0047 padding-left: 20px; 0048 padding-top: 100px; 0049 } 0050 0051 a.btn-xs 0052 { 0053 line-height: 12px; 0054 padding: 3px 5px; 0055 border-radius: 2px; 0056 margin: 2px; 0057 float: right; 0058 } 0059 0060 0061 div.jtable-main-container table.jtable .tooltipuser{ 0062 color: #2673b0; 0063 cursor: pointer; 0064 } 0065 0066 div.jtable-main-container img.avatar{ 0067 width: 50px; 0068 border: 1px solid #dbdbdb; 0069 -webkit-border-radius: 999px; 0070 -moz-border-radius: 999px; 0071 border-radius: 999px; 0072 -webkit-background-clip: padding-box; 0073 -moz-background-clip: padding; 0074 background-clip: padding-box; 0075 display: block; 0076 } 0077 0078 a.removeuser{ 0079 display: block; 0080 } 0081 0082 .aligncenter 0083 { 0084 text-align: center; 0085 } 0086 0087 0088 </style> 0089 0090 <link href="/theme/backend/lib/jquery-ui/themes/smoothness/jquery-ui.min.css" rel="stylesheet"> 0091 <link href="/theme/backend/lib/jtable/themes/jqueryui/jtable_jqueryui.min.css" rel="stylesheet"> 0092 <script src="/theme/backend/lib/jquery-ui/jquery-ui.min.js"></script> 0093 <script src="/theme/backend/lib/jtable/jquery.jtable.min.js"></script> 0094 0095 <div class="messages"> 0096 0097 </div> 0098 <div class="tooltip_templates" style="display:none"> 0099 <span id="tooltip_content"> 0100 <i class="fa fa-spinner"></i> 0101 </span> 0102 </div> 0103 <div id="titleheader"> <h1>Table of lastest products with at least 10 files </h1></div> 0104 <div id="TableContainer"></div> 0105 <div id="dialog-form" title="Object Details"></div> 0106 <div id="dialog-confirm" title="Confirm"></div> 0107 <script type="text/javascript"> 0108 $(document).ready(function () { 0109 $('#TableContainer').jtable({ 0110 jqueryuiTheme: true, 0111 paging: true, 0112 sorting: false, 0113 actions: { 0114 listAction: '/spam/productfiles', 0115 }, 0116 recordsLoaded: function (event, data) { 0117 TooltipUser.setup("tooltipuser","right"); 0118 }, 0119 rowInserted: function (event, data) { 0120 if (data.record.is_wallpaper==1) { 0121 data.row.css("background", "#F7F7E1"); 0122 } 0123 0124 }, 0125 fields: { 0126 project_id: { 0127 key: true, 0128 title: 'project id', 0129 create: false, 0130 edit: false, 0131 list: true, 0132 display:function(data){ 0133 return '<a style="color:#2673b0" href="/p/'+data.record.project_id+'" target="_blank">'+data.record.project_id+'<a>'; 0134 } 0135 }, 0136 cat_title: { 0137 title: 'category', 0138 create: false, 0139 edit: false, 0140 list: true 0141 }, 0142 0143 status: { 0144 title: 'status', 0145 width: '5%', 0146 edit: false, 0147 display:function(data){ 0148 if(data.record.status!=100) 0149 { 0150 return '<span style="color:red">unpublished</span>'; 0151 } 0152 return ''; 0153 } 0154 }, 0155 cntfiles: { 0156 title: '#Files', 0157 width: '5%', 0158 edit: false, 0159 display:function(data){ 0160 return data.record.cntfiles; 0161 } 0162 }, 0163 0164 size: { 0165 title: 'size_sum', 0166 width: '5%', 0167 edit: false, 0168 }, 0169 created_at: { 0170 title: 'created', 0171 width: '10%', 0172 create: false, 0173 edit: false 0174 }, 0175 member_id: { 0176 title: 'by', 0177 width: '5%', 0178 edit: false, 0179 display:function(data){ 0180 var html = '<a href="/u/'+data.record.username+'" target="_blank" class="tooltipuser" data-tooltip-content="#tooltip_content" data-user="'+data.record.member_id+'" >'; 0181 0182 if(data.record.is_deleted==1) 0183 { 0184 html += '<span style="color:red">'+data.record.username+'</span></a>'; 0185 }else{ 0186 html=html+data.record.username+'</a>'; 0187 } 0188 0189 0190 return html; 0191 } 0192 }, 0193 earn: { 0194 title: 'last month earn', 0195 width: '10%', 0196 create: false, 0197 edit: false, 0198 display:function(data){ 0199 return data.record.earn; 0200 } 0201 0202 }, 0203 paypal_mail: { 0204 title: 'paypal', 0205 width: '10%', 0206 create: false, 0207 edit: false, 0208 0209 } 0210 0211 } 0212 }); 0213 0214 //$('#TableContainer').jtable('load'); 0215 $('#TableContainer').jtable('load', {},function(){ 0216 //TooltipUser.setup("tooltipuser","right"); 0217 }); 0218 0219 $("#dialog-form").dialog({ 0220 autoOpen: false, 0221 //height: 350, 0222 width: 600, 0223 modal: true, 0224 buttons: { 0225 Close: function () { 0226 $(this).dialog("close"); 0227 } 0228 } 0229 }); 0230 0231 0232 0233 /*$('body').on("click", 'a.removecomment', function (event) { 0234 event.preventDefault(); 0235 event.stopImmediatePropagation(); 0236 0237 //$("#dialog-confirm").html('are you sure to delete this comment ?').dialog('open'); 0238 var elementRecord = $(this).data("record"); 0239 0240 $("#dialog-confirm").html('are you sure to delete this comment ?').dialog({ 0241 autoOpen: true, 0242 html: 'are you sure to delete this comment ?', 0243 width: 600, 0244 modal: true, 0245 buttons: { 0246 "Confirm" : function() { 0247 jQuery.ajax({ 0248 data: {'comment_id': elementRecord}, 0249 url: '/spam/deletecomment', 0250 type: 'post', 0251 error: function () { 0252 alert("<span class='error'>Service is temporarily unavailable. Our engineers are working quickly to resolve this issue. <br/>Find out why you may have encountered this error.</span>"); 0253 return false; 0254 }, 0255 success: function (results) { 0256 $("#dialog-confirm").dialog("close"); 0257 $('#TableContainer').jtable('reload'); 0258 return false; 0259 } 0260 }); 0261 }, 0262 "Cancel" : function() { 0263 $(this).dialog("close"); 0264 } 0265 } 0266 }); 0267 0268 return false; 0269 0270 });*/ 0271 0272 0273 0274 }); 0275 </script>