<commit_before><?php
include_once('/home/content/59/13071759/html/config/index.php');
$config = new Blog();

// get tag value
if (isset($_POST["page"]) ) {
	$tag = $_POST["page"];
} else {
	$tag = '';
}
?>


<nav class="event-option-panel btn-group" style="background-color:transparent;text-align:left;border-bottom:3px solid #303030;padding:2% 0%;">
	<!-- <button class="btn btn-success btn-xs add-new-media-idea" data-link="http://freelabel.net/users/note/index?uid=<?php echo Session::get('user_name'); ?>&type=idea" ><i class="fa fa-plus"></i> Add New Ideas</button> -->
	<button class="btn btn-success btn-xs add-new-media-audio" data-link="http://freelabel.net/upload/?uid=<?php echo Session::get('user_name'); ?>&type=idea" ><i class="fa fa-plus"></i> Add New Files To Box</button>
	<!-- <a onclick="loadPage('http://freelabel.net/users/dashboard/photos/?view=booking#events', '#main_display_panel #section-linemove-3 ', 'all' , 'AlexMayo')" href="#" class="btn btn-default btn-xs">All</a>
	<a onclick="loadPage('http://freelabel.net/users/dashboard/photos/?view=booking#events', '#main_display_panel #section-linemove-3 ', 'tasks' , 'AlexMayo')" href="#" class="btn btn-default btn-xs">Tasks</a>
	<a onclick="loadPage('http://freelabel.net/users/dashboard/photos/?view=booking#events', '#main_display_panel #section-linemove-3 ', 'meetings' , 'AlexMayo')" href="#" class="btn btn-default btn-xs">Meetings</a>
	<a onclick="loadPage('http://freelabel.net/users/dashboard/photos/?view=booking#events', '#main_display_panel #section-linemove-3 ', 'performances' , 'AlexMayo')" href="#" class="btn btn-default btn-xs">Performances</a>
	<a onclick="loadPage('http://freelabel.net/users/dashboard/photos/?view=booking#events', '#main_display_panel #section-linemove-3 ', 'clients' , 'AlexMayo')" href="#" class="btn btn-default btn-xs">Public</a> -->
	<!--<button class='btn btn-default btn-xs event-option-add'><span class='glyphicon glyphicon-plus'></span> Add New Event</button>-->
	<select class="form-control dropdown-filter" style='max-width:200px;display:inline;'>
		<option value="audio" >Audio</option>
		<option value="video" >Videos</option>
		<option value="photo" >Photos</option>
		<option value="document" >Documents</option>
	</select>
</nav>


<!-- <nav class="event-option-panel btn-group" style="background-color:transparent;text-align:left;border-bottom:3px solid #303030;padding:2% 0%;"> -->
<!-- get user tags  -->
<?php
// echo $config->get_user_tags(Session::get('user_name'));
?>
<!-- </nav> -->

<!-- display content  -->
<div id="files-list">
	<ul class="list">
		<?php $files = $config->getFilesByUser(Session::get('user_name') , 20);
		echo $config->display_files($files , Session::get('user_name'));
		?>
	</ul>
</div>


<script src='http://freelabel.net/config/globals.js'></script>
<script type="text/javascript" src="http://freelabel.net/js/jquery.jeditable.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.1.1/list.min.js"></script>
<script type="text/javascript">

	$(function(){

		var options = {
		    valueNames: [ 'list_type' ]
		};
		var list = new List('files-list', options);

	    $('.dropdown-filter').change(function(event){
	    	var filterValue = $(this).val();
			list.filter(function(item) {
			// console.log(item.values().list_type);
		    if(item.values().list_type == filterValue) {
		      return true;
		    } else {
		      return false;
		    }
		  });
		  return false;
	    });







    // ********************************* 
    //  SHARE
    // *********************************
    $(".share-file-button").click(function(event){
      $('.push_file_form').hide('fast');
      $(this).parent().css('border','solid 3px #e3e3e3');
      $(this).hide('fast');
      event.preventDefault();
      var file_id = $(this).attr('id');
      var wrapper = $(this).parent();
      var url = 'http://freelabel.net/users/login/add_promo/' + file_id + '/' + 'WHATBRUH';
      var dataId =  $(this).attr('id');
      var dataUser =  $(this).attr('data-user');
      var dataTitle =  $(this).attr('data-filetitle');
      var dataFilePath =  $(this).attr('data-filepath');
      var getData = { 
        id: dataId, 
        user_name: dataUser,
        title: dataTitle,
        img_path: dataFilePath
      };
      // load alert into the modal
      $.get('http://freelabel.net/users/dashboard/attach/',getData,function(data){
        wrapper.append(data);
      });

    });





    // ********************************* 
    //  DELETE FILE CONTROL 
    // *********************************
    $(".delete-file-button").click(function(event){
      event.preventDefault();
      var file_id = $(this).attr('id');
      var wrapper = $(this).parent();
      // alert("deleting this file!!" + file_id);
      var url = 'http://freelabel.net/users/login/delete_file/' + file_id + '/';
      c = confirm("Are you sure you want to delete this file?");
      if (c==true) {
        $.get(url,function(result){
          // alert(result);
          wrapper.hide('fast');
        });
      }     
    });













	});


	$(".add-new-media-idea").click(function(event) {
	event.preventDefault();
    var link = $(this).attr('data-link');
    window.location.assign(link);
    }); 

    $('.dropdown-filter').change(function(event){
  //   	var filterValue = $(this).val();
		// list.filter(function(item) {
	 //    if(item.values().location_id == 'Dallas') {
	 //      return true;
	 //    } else {
	 //      return false;
	 //    }
	 //  });
	 //  return false;
    });



    $('.editable-file').editable('http://freelabel.net/submit/update.php',{
         type:  'text',
         name:  'file',
         title: 'Enter Orphan URL',
         tooltip   : 'Click to Edit URL...'
    });



 $('video').click(function(){
 	var data = $(this);
 	$(this).get(0).play()
 	console.log(data);
 });




</script>

<script type="text/javascript">
  

<?php 
if (isset($_SESSION['user_name'])) {
  echo 'var userNameSession = "'.Session::get('user_name').'";';
} else {
  echo 'var userNameSession = "submission";';
  // echo 'alert("no users found!")';
} 
?>




$(function() {
  // config
  function isPlaying(audelem) {<commit_msg>fixed the add to files button on new framework<commit_after><?php
include_once('/home/content/59/13071759/html/config/index.php');
$config = new Blog();

// get tag value
if (isset($_POST["page"]) ) {
	$tag = $_POST["page"];
} else {
	$tag = '';
}
?>


<nav class="event-option-panel btn-group" style="background-color:transparent;text-align:left;border-bottom:3px solid #303030;padding:2% 0%;">
	<!-- <button class="btn btn-success btn-xs add-new-media-idea" data-link="http://freelabel.net/users/note/index?uid=<?php echo Session::get('user_name'); ?>&type=idea" ><i class="fa fa-plus"></i> Add New Ideas</button> -->
	<button class="btn btn-success btn-xs add-new-media-audio" data-link="http://freelabel.net/upload/?uid=<?php echo Session::get('user_name'); ?>&type=idea" ><i class="fa fa-plus"></i> Add New Files To Box</button>
	<!-- <a onclick="loadPage('http://freelabel.net/users/dashboard/photos/?view=booking#events', '#main_display_panel #section-linemove-3 ', 'all' , 'AlexMayo')" href="#" class="btn btn-default btn-xs">All</a>
	<a onclick="loadPage('http://freelabel.net/users/dashboard/photos/?view=booking#events', '#main_display_panel #section-linemove-3 ', 'tasks' , 'AlexMayo')" href="#" class="btn btn-default btn-xs">Tasks</a>
	<a onclick="loadPage('http://freelabel.net/users/dashboard/photos/?view=booking#events', '#main_display_panel #section-linemove-3 ', 'meetings' , 'AlexMayo')" href="#" class="btn btn-default btn-xs">Meetings</a>
	<a onclick="loadPage('http://freelabel.net/users/dashboard/photos/?view=booking#events', '#main_display_panel #section-linemove-3 ', 'performances' , 'AlexMayo')" href="#" class="btn btn-default btn-xs">Performances</a>
	<a onclick="loadPage('http://freelabel.net/users/dashboard/photos/?view=booking#events', '#main_display_panel #section-linemove-3 ', 'clients' , 'AlexMayo')" href="#" class="btn btn-default btn-xs">Public</a> -->
	<!--<button class='btn btn-default btn-xs event-option-add'><span class='glyphicon glyphicon-plus'></span> Add New Event</button>-->
	<select class="form-control dropdown-filter" style='max-width:200px;display:inline;'>
		<option value="audio" >Audio</option>
		<option value="video" >Videos</option>
		<option value="photo" >Photos</option>
		<option value="document" >Documents</option>
	</select>
</nav>


<!-- <nav class="event-option-panel btn-group" style="background-color:transparent;text-align:left;border-bottom:3px solid #303030;padding:2% 0%;"> -->
<!-- get user tags  -->
<?php
// echo $config->get_user_tags(Session::get('user_name'));
?>
<!-- </nav> -->

<!-- display content  -->
<div id="files-list">
	<ul class="list">
		<?php $files = $config->getFilesByUser(Session::get('user_name') , 20);
		echo $config->display_files($files , Session::get('user_name'));
		?>
	</ul>
</div>


<script src='http://freelabel.net/config/globals.js'></script>
<script type="text/javascript" src="http://freelabel.net/js/jquery.jeditable.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.1.1/list.min.js"></script>
<script type="text/javascript">

	$(function(){

		var options = {
		    valueNames: [ 'list_type' ]
		};
		var list = new List('files-list', options);

	    $('.dropdown-filter').change(function(event){
	    	var filterValue = $(this).val();
			list.filter(function(item) {
			// console.log(item.values().list_type);
		    if(item.values().list_type == filterValue) {
		      return true;
		    } else {
		      return false;
		    }
		  });
		  return false;
	    });







    // ********************************* 
    //  SHARE
    // *********************************
    $(".share-file-button").click(function(event){
      $('.push_file_form').hide('fast');
      $(this).parent().css('border','solid 3px #e3e3e3');
      $(this).hide('fast');
      event.preventDefault();
      var file_id = $(this).attr('id');
      var wrapper = $(this).parent();
      var url = 'http://freelabel.net/users/login/add_promo/' + file_id + '/' + 'WHATBRUH';
      var dataId =  $(this).attr('id');
      var dataUser =  $(this).attr('data-user');
      var dataTitle =  $(this).attr('data-filetitle');
      var dataFilePath =  $(this).attr('data-filepath');
      var getData = { 
        id: dataId, 
        user_name: dataUser,
        title: dataTitle,
        img_path: dataFilePath
      };
      // load alert into the modal
      $.get('http://freelabel.net/users/dashboard/attach/',getData,function(data){
        wrapper.append(data);
      });

    });





    // ********************************* 
    //  DELETE FILE CONTROL 
    // *********************************
    $(".delete-file-button").click(function(event){
      event.preventDefault();
      var file_id = $(this).attr('id');
      var wrapper = $(this).parent();
      // alert("deleting this file!!" + file_id);
      var url = 'http://freelabel.net/users/login/delete_file/' + file_id + '/';
      c = confirm("Are you sure you want to delete this file?");
      if (c==true) {
        $.get(url,function(result){
          // alert(result);
          wrapper.hide('fast');
        });
      }     
    });



  $(".add-new-media-audio").click(function(event) {
  event.preventDefault();
    var link = $(this).attr('data-link');
    window.location.assign(link);
  }); 










	});



    $('.dropdown-filter').change(function(event){
  //   	var filterValue = $(this).val();
		// list.filter(function(item) {
	 //    if(item.values().location_id == 'Dallas') {
	 //      return true;
	 //    } else {
	 //      return false;
	 //    }
	 //  });
	 //  return false;
    });



    $('.editable-file').editable('http://freelabel.net/submit/update.php',{
         type:  'text',
         name:  'file',
         title: 'Enter Orphan URL',
         tooltip   : 'Click to Edit URL...'
    });



 $('video').click(function(){
 	var data = $(this);
 	$(this).get(0).play()
 	console.log(data);
 });





</script>

<script type="text/javascript">
  

<?php 
if (isset($_SESSION['user_name'])) {
  echo 'var userNameSession = "'.Session::get('user_name').'";';
} else {
  echo 'var userNameSession = "submission";';
  // echo 'alert("no users found!")';
} 
?>




$(function() {
  // config
  function isPlaying(audelem) {
{'fraction_non_alphanumeric': 0.22937625754527163, 'fraction_numerical': 0.0074044265593561365, 'mean_word_length': 3.466570812365205, 'pattern_counts': {'":': 0, '<': 127, '<?xml version=': 0, '>': 133, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1447363', 'n_tokens_mistral': 4331, 'n_tokens_neox': 4082, 'n_words': 686}