В нужном месте напиши
<p>{$usr.id}</p>
<p>{$usr.id}</p>
if ($do=='editprofile'){ $opt = $inCore->request('opt', 'str', 'edit'); .......... .......... ................
if (strlen($city)>20) { cmsCore::addSessionMessage($_LANG['LONG_CITY_NAME'], 'error'); $errors = true; }
if (strlen($city)>30) { cmsCore::addSessionMessage($_LANG['LONG_CITY_NAME'], 'error'); $errors = true;
Петропавловск-Камчатский, 24 символа
if(!$inCore->request('city')){ $msg .= $_LANG['CITY_ERROR'].'<br/>'; } else { else {$city = $inCore->request('city', 'str', '');} }
if(!$inCore->request('city')){ $msg .= $_LANG['CITY_ERROR'].'<br/>'; } else { $city = $inCore->request('city', 'str', ''); }
$_LANG['CITY'] ='Город'; $_LANG['CITY_ERROR'] ='Введите город!'; $_LANG['CITY_ERR_LEN'] ='Что-то город подозрительный! Не более 20 символов!';
<tr> <td valign="top" class=""><strong>{$LANG.CITY}:</strong></td> <td valign="top" class=""> <input name="city" id="city" type="text" size="30" value="{$city}"/> <span class="regstar">*</span> </td> </tr>
if ($do=='register'){ $inPage->setTitle($_LANG['REGISTRATION']); $msg = '';
if($inCore->inRequest('email')) { $email = $inCore->request('email', 'str', ''); $msg .= $_LANG['ERR_EMAIL'].'<br/>'; } }
if(!$inCore->request('city')){ $msg .= $_LANG['CITY_ERROR'].'<br/>'; } else { else {$city = $inCore->request('city', 'str', '');} }
//create advanced user profile if ($new_user_id){ $usr = $inDB->fetch_assoc($result); $sql = "INSERT INTO cms_user_profiles (user_id, city, description, showmail, showbirth, showicq, karma, imageurl, allow_who) VALUES (".$new_user_id.", '', '', '0', '0', '1', '0', '', 'all')";
//create advanced user profile if ($new_user_id){ $usr = $inDB->fetch_assoc($result); $sql = "INSERT INTO cms_user_profiles (user_id, city, description, showmail, showbirth, showicq, karma, imageurl, allow_who) VALUES (".$new_user_id.", '$city', '', '0', '0', '1', '0', '', 'all')";
$smarty = $inCore->initSmarty('components', 'com_registration.tpl'); $smarty->assign('cfg', $cfg);
$smarty = $inCore->initSmarty('components', 'com_registration.tpl'); $smarty->assign('cfg', $cfg); $smarty->display('com_registration.tpl');
{if $usr.city} <div class="field"> <div class="title">{$LANG.CITY}:</div> <div class="value"><a href="/users/city/{$usr.cityurl}">{$usr.city}</a></div> </div> {/if}
<a href="/content/edit{$article.id}.html">Редактировать</a>
if ($do=='profile'){ $inCore->loadLib('clubs'); if (!$id){ $login = $inCore->request('login', 'str', ''); $id = $inDB->get_fields('cms_users', "login='{$login}'", 'id', 'is_deleted ASC'); $id = $id['id']; } $usr = $model->getUser($id); ................ ..................... ....................... ..................... //отдаем в шаблон $smarty = $inCore->initSmarty('components', 'com_users_profile.tpl'); $smarty->assign('id', $id); $smarty->assign('usr', $usr); $smarty->assign('plugins', $plugins); $smarty->assign('messages', cmsCore::getSessionMessages()); $smarty->assign('cfg', $cfg); $smarty->assign('myprofile', $myprofile); $smarty->assign('is_admin', $inUser->is_admin); $smarty->assign('is_auth', $inUser->id); $smarty->display('com_users_profile.tpl'); }