Location: PHPKode > projects > QT-registrations > qtregistrations/qtr_j_user.php
<?php

// QT-registerations 2.4 build:20100313

include('bin/qt_lib_txt.php');
include('bin/qt_lib_db.php');
include('bin/qtr_fn_base.php');
include('bin/qtr_fn_html.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.'/qtr_main.php');
include('bin/config.php');

$oDBAJAX = new cDB($qtr_dbsystem,$qtr_host,$qtr_database,$qtr_user,$qtr_pwd,$qtr_port,$qtr_dsn);
if ( !empty($oDBAJAX->error) ) exit;

// query

$oDBAJAX->Query('SELECT * FROM '.$qtr_prefix.'qtruser WHERE id='.$id);
$row = $oDBAJAX->GetRow();
$row['name'] = QTconv($row['name'],'5');

//output the response

echo AsImgBox( 
  (empty($row['photo']) ? '' : AsImg($dir.$row['photo'],'',$row['name'])),
  'picbox',
  '',
  $row['name'].'<br/>('.QTconv($L['Userrole'][$row['role']],'5').')'.(empty($row['location']) ? '' : '<br/>'.QTconv($row['location'],'5'))
  );

?>
Return current item: QT-registrations