Location: PHPKode > projects > QuickTalk Forum > quicktalk/qtf_j_user.php
<?php



// QuickTalk 2.5 build:20100924



include('bin/qt_lib_txt.php');

include('bin/qt_lib_db.php');

include('bin/qtf_fn_base.php');



// Protection against injection (accept only 3 'lang')

$id = strip_tags($_POST['id']);

$lang = strip_tags($_POST['lang']);

if ( !in_array($lang,array('language/english','language/francais','language/nederlands')) ) $lang = 'language/english';

$dir = strip_tags($_POST['dir']);



$id = intval(substr($id,1));



include($lang.'/qtf_main.php');

include('bin/config.php');



$oDBAJAX = new cDB($qtf_dbsystem,$qtf_host,$qtf_database,$qtf_user,$qtf_pwd,$qtf_port,$qtf_dsn);

if ( !empty($oDBAJAX->error) ) exit;



// query



$oDBAJAX->Query('SELECT * FROM '.$qtf_prefix.'qtauser WHERE id='.$id);

$row = $oDBAJAX->GetRow();



//output the response



echo AsImgBox(

  (empty($row['picture']) ? '' : AsImg($dir.$row['picture'],'',$row['name'])),

  'picbox',

  '',

  $row['name'].'<br/>('.QTconv($L['Userrole'][$row['role']],'5').')'.(empty($row['location']) ? '' : '<br/>'.QTconv($row['location'],'5'))

  );



?>
Return current item: QuickTalk Forum