Kyberia v2.3 - 1st revision from SVN (Without patches of kyberia.sk team)
[mirrors/Kyberia-bloodline.git] / inc / smarty / node_methodz / function.get_image_link.php
1 <?php
2 function smarty_function_get_image_link($params,&$smarty) {
3 global $db;
4 $id = $params['id'];
5 $img = SYSTEM_ROOT."/images/nodes/".substr($id,0,1)."/".substr($id,1,1)."/$id.gif";
6
7 if (file_exists($img)) {
8 echo "/images/nodes/".substr($id,0,1)."/".substr($id,1,1)."/$id.gif";
9 }
10 else {
11 $set = $db->query("select user_id from users where user_id = $id");
12 if ($set->getNumRows() > 0) $imglink = "/images/nodes///.gif";
13 else $imglink = "/images/nodes/1/0/101.gif";
14 echo $imglink;
15 }
16 }
17 ?>
This page took 0.348808 seconds and 4 git commands to generate.