1){ for ($j=0;$j<$nPage;$j++){ if (($j+1) ==1){ $sPage .= ''; } else { $sPage .= ' | '; } if(($j+1) == $p){ $sPage .= ''.($j+1).' '; } else{ $sPage .= ''.($j+1).' '; } } } $currentPage = $p; $maxPage = $nPage; $myphotos = getPhotosByAuthorLimit($author_id,$start,$nGallaryPerPage); $arrData['UserNickname'] = $authornickname; $arrData['UserName'] = $author_name; $strUserCategory = ereg_replace('[a-zA-Z]*-', '', $arrData['UserName']); $strUserPref = ereg_replace('-[a-zA-Z]*', '', $arrData['UserName']); $smarty->assign( 'arrData', $arrData ); $smarty->assign( 'UserCategory', $strUserCategory ); $smarty->assign( 'UserPref', $strUserPref ); $smarty->assign( 'sPage', $sPage ); $smarty->assign( 'myphotos', $myphotos ); $smarty->assign( 'currentPage', $currentPage ); $smarty->assign( 'maxPage', $maxPage ); $smarty->display( 'photogallary/CMS_PHOTO_main.tpl' ); ?>