Uname: Linux webm001.cluster110.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 7.3.33 [ PHP INFO ] PHP os: Linux
Server Ip: 213.186.33.19
Your Ip: 216.73.216.124
User: creationoo (224166) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : getVideoProject.php
<?php

$wpLocation = str_replace("wp-content/themes/walker-wp/js", "", dirname(__FILE__));

require_once( $wpLocation . 'wp-load.php' );


if (isset($_POST['pid'])){
   

	//set the query_posts args
	$args= array(
		'p' => $_POST['pid'], 
	 	'post_type' => DESIGNARE_PORTFOLIO_POST_TYPE
	);
	
	$project_id = 1;
	$the_cat = array();

	query_posts($args);
		
		if(have_posts()) {
			 while (have_posts()) {
			 	the_post();
			 	
			 	$cat_class = "";
			 	$cat_name = "";
			 	$cat_type = "";
			 	
			 	
			 	$terms = get_the_terms($post->ID, 'portfolio_category');
			 	if ( $terms && ! is_wp_error( $terms ) ) { 
					foreach ( $terms as $t ) {
						array_push($the_cat, $t->slug);
						$cat_class .= $t->slug . " ";
						$cat_name .= $t->name . ", ";
					}
				}
				
				$terms2 = get_the_terms($post->ID, 'portfolio_type');
				if ( $terms2 && ! is_wp_error( $terms2 ) ) { 
					foreach ( $terms2 as $t2 ) {
						$cat_type .= $t2->name . ", ";
					}
				}

 				$result .= "<div class='fullscreen-info' style='display:none'><div class='title'>". get_the_title()."</div><div class='images'>";
 				$coll = designare_get_slider_data(get_post_meta($post->ID, 'collection_value', true)); 
				
				$totalImg = 0;
				foreach($coll['posts'] as $c){

					$p = get_post_meta($c->ID, 'custom_video_id');
					$result .= "<div id='video_src'>" . $p[0] . "</div>";
					if ($totalImg == 0) $firstImg = $p[0];
					$totalImg++;
					
				}
				
				$content = do_shortcode(get_the_content());
				$content = apply_filters('the_content', $content);
				$content = str_replace(']]>', ']]&gt;', $content);

				$result .= "</div><div class='FSdescription'><div class='FStop'><div class='type'>". substr_replace($cat_type, '', -2)."</div><div class='category'>". substr_replace($cat_name, '', -2)."</div></div><div class='FScontent'>". $content ."</div></div></div>";

		}
		$project_id++;
	} else { $result = "nao ha ca nada"; }

	//$result = "osidjfhbspijfb ";
	
	$result = htmlspecialchars($result);
	
	$result = preg_replace('/\s+/', ' ',$result);
	
	echo '{"response":{"error": "1", "content":"'. $result . '", "totalImg": "'. $totalImg .'", "firstImg":"'.$firstImg.'" }}';

}

© 2026 MAINHACK