77552050f94fb8b70b14a8a9330734e66bc7cfce
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / smarty / node_methodz / function.get_id_by_name.php
1 <?php
2 function smarty_function_get_id_by_name($params,&$smarty) {
3 $name = mysql_real_escape_string($params['name']);
4 global $db;
5 $q="select user_id from users where login='$name'";
6 $set=$db->query($q);
7 if ($set->getNumRows() > 0) {
8 $set->next();
9 $id=$set->getString('user_id');
10 }
11 else $id = '1';
12 $smarty->assign('get_id_by_name',$id);
13 }
14 ?>
This page took 0.227315 seconds and 3 git commands to generate.