PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /home/trave494/polo-family.com/wp-content/plugins/wooaffiliates/_utils/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : //home/trave494/polo-family.com/wp-content/plugins/wooaffiliates/_utils/envato.utils.php |
<?php die; ?> // https://build.envato.com/api/ (function (window, document, $, undefined) { var ww = $('ul#search_endpoint_list ul.operations:first'); ww = ww.find('form.sandbox table.fullwidth'); var tmp = [], categs = []; // get csv content ww.find('tbody.operation-params tr').each(function (i) { var $this = $(this); var categ = { 'name' : '', 'type' : '', 'desc' : '', 'sel_val' : [] }, categ2index = ['name', 'type', 'desc', 'sel_val']; $this.find('td').each(function(ii) { var $this2 = $(this); if (ii > 2) return true; var val = columnsParse( ii, $this2 ); val = $.trim( val ); categ[ categ2index[ii] ] = val; // select values if (ii == 1) { var val = columnsParse( 3, $this2 ); categ[ categ2index[3] ] = val; } }); categs.push( categ ); }); //console.log( categs ); // get category parameters function columnsParse( index, column ) { // name if ( $.inArray(index, [0]) > -1 ) { return $.trim( column.text() ); } // element type else if ( $.inArray(index, [1]) > -1 ) { return column.find('input.parameter').length ? 'input' : 'select'; } // desc else if ( $.inArray(index, [2]) > -1 ) { var tmp = []; column.find('p').each(function (i) { tmp.push( $.trim( $(this).text() ) ); }); return $.trim( tmp.join(',') ); } // special case: uses still the column[1] else if ( $.inArray(index, [3]) > -1 ) { var sel = column.find('select.parameter'), vals = []; if ( sel.length ) { vals.push({ 'key' : '', 'val' : '' }); sel.find('option').each(function(i) { var that = $(this), val = that.val(); val = $.trim( val ); if ( val != '' ) { vals.push({ 'key' : that.val(), 'val' : that.text() }); } }); } return vals; } }; // end function columnsParse function generateCSV( what ) { var what = what || 'type'; var LN = '\n', TAB = '\t', _2TAB = TAB+TAB, _3TAB = TAB+TAB+TAB, _4TAB = TAB+TAB+TAB+TAB; LN = ''; // generate php array if ( 'type' == what ) { for (var i in categs) { var v = categs[i]; if ( v.name == '' || v.type == '' ) continue; console.log( _4TAB + "'" + v.name + "' " + _4TAB + " => '" + v.type + "'," ); //console.log( v ); } } else if ( 'desc' == what ) { for (var i in categs) { var v = categs[i]; if ( v.name == '' || v.type == '' ) continue; console.log( TAB + "'" + v.name + "' " + _4TAB + " => '" + v.desc + "'," ); //console.log( v ); } } else if ( 'select_values' == what ) { for (var i in categs) { var v = categs[i]; if ( v.name == '' || v.type == '' ) continue; var sel_val = v.sel_val; if ( sel_val.length > 0 ) { console.log( TAB + "'" + v.name + "' " + _4TAB + " => array(" ); for (var ii in sel_val) { var vv = sel_val[ii]; console.log( _2TAB + "'" + vv.key + "' " + _4TAB + " => '" + vv.val + "'," ); } console.log( TAB + ")," ); } //console.log( v ); } } } //generateCSV( 'type' ); //generateCSV( 'desc' ); //generateCSV( 'select_values' ); console.log('UNCOMMENT THE LINES WITH generateCSV function call!'); })(window, document, jQuery);