getDbField($key); } function getSocialsDbKeys($key){ $theme_settings = new theme_settings_model(); return $theme_settings->getSocialsDbKeys($key); } function mediaExist(){ $media = getSocialsDbKeys('%_social_link'); foreach($media as $i) { if(getDbField($i->klucz) != '') { return true; } } return false; } function mediaPrint(){ $media = getSocialsDbKeys('%_social_link'); $pola = explode(',',getDbField('social_positions')); $pozycje = array(); foreach($pola as $rows) { $row = split(':',$rows); if($row != ','){ $pozycje[(int)$row[1]] = $row[0]; } } foreach($pozycje as $key) { $dbKey = $key.'_social_link'; $className = str_replace(array('_social_link','_'), '', $dbKey ); $titleName = ucwords(str_replace('_', ' ', str_replace('_social_link', '', $dbKey ) )); if(getDbField($dbKey) != '') { ?>