Jump to content

Problems including a file


Utherr12

Recommended Posts

include_once '../../../../inc/init.php';require_once '../lang/'.$conf['lang'].'/lang.php';echo $lang['name'];											//this works and display 'Name: 'if(!isset($_REQUEST['action'])) exit(0);$ACTION = $_REQUEST['action'];switch ($ACTION) {	case 'get_info': {		--something--		break;	}	case 'search': {		$search_string = trim(strip_tags($_REQUEST['string']));		$sort = $_REQUEST['sortBy'];		$values = "";								 //$xml is from SimpleXMLElement				$json = json_encode($xml);		$json_d = json_decode($json,true);		$x = JSONtoHTML($json_d);		echo $x;		break;	}}function JSONtoHTML($json){	$html = "";	$tags = "";	if(empty($json))		return 0;	foreach($json['plugin'] as $plugin) {		$html .= '<span name="plugin_search" p_name="'.$plugin['id'].'" p_author="'.$plugin['author'].'" p_type="'.$plugin['type'].'">';		$html .= '	<p><h4>'.$lang['name'].$plugin['name'].'</h4></p>';		$html .= '	<p><b>'.$lang['author'].'</b>'.$plugin['author'].'</p>';		$html .= '	<p><b>'.$lang['type'].'</b>'.$plugin['type'].'</p>';		$html .= '	<p><b>'.$lang['last_update'].'</b>'.$plugn['lastupdate'].'</p>';		$html .= '	<p><b>'.$lang['description'].'</b>'.$plugin['description'].'</p>';		foreach($plugin['tags'] as $tag)			$tags .= $tag." ";		$html .= '	<p><b>'.$lang['tags'].'</b>'.$tags.'</p>';		$html .= '	<input class="button" type="button" value="'.$lang['btn_download'].'" /><hr />';		$html .= '</span>';		$tags = "";	}	return $html;}// the function works, except that $lang[''] is not displayed anywhere

Help? (again) $lang array is taken from lang.php

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...