Войти
Введите цифры и буквы
Виталий
PluginBands_ModuleBlogbands_EntityBlogbands Object ( [_aData:protected] => Array ( [0] => Array ( [topic_id] => 1 [blog_id] => 3 [user_id] => 1 [topic_type] => topic [topic_title] => Мэр Костромы Александр Кудрявцев досрочно сложил полномочия [topic_tags] => Кострома,депутат,повительство [topic_date_add] => 2011-02-16 09:41:09 [topic_date_edit] => 2011-02-16 21:31:33 [topic_user_ip] => 46.42.30.223 [topic_publish] => 1 [topic_publish_draft] => 1 [topic_publish_index] => 1 [topic_rating] => 1.000 [topic_count_vote] => 1 [topic_count_read] => 48 [topic_count_comment] => 5 [topic_cut_text] => [topic_forbid_comment] => 0 [topic_text_hash] => 4adad33714c3a90f89d375ff148be29a [bands_id] => 5 ) [1] => Array ( [topic_id] => 2 [blog_id] => 3 [user_id] => 1 [topic_type] => topic [topic_title] => Костромичи стали лучшими в экстремальных прыжках на велосипедах [topic_tags] => Кострома,победа,прыжки [topic_date_add] => 2011-02-16 09:41:59 [topic_date_edit] => 2011-02-16 21:31:06 [topic_user_ip] => 46.42.30.223 [topic_publish] => 1 [topic_publish_draft] => 1 [topic_publish_index] => 1 [topic_rating] => 0.000 [topic_count_vote] => 0 [topic_count_read] => 15 [topic_count_comment] => 0 [topic_cut_text] => [topic_forbid_comment] => 0 [topic_text_hash] => 65fd9d8ac97a45311458756583048948 [bands_id] => 5 ) ) )
{foreach from=$aTopics key=i item=oTopic} {$oTopic->getTopicTitle($i)} {/foreach}
public function getTopicTitle($i) { return $this->_aData[$i]['topic_title']; }
SELECT comment_id FROM ".Config::Get('db.table.comment_online')." UNION SELECT comment_id FROM ".Config::Get('db.table.comment_online2')."
function func_img_resize_ovimovies($sFileSrc,$sDirDest,$sFileDest,$iWidthMax,$iHeightMax,$iWidthDest=null,$iHeightDest=null,$bForcedMinSize=true,$iQualityJPG) { if (!($aSize=getimagesize($sFileSrc))) { return false; } $img_src=false; switch ($aSize['mime']) { case 'image/png': $img_src=imagecreatefrompng($sFileSrc); $sFileDest.='.png'; break; case 'image/gif': $img_src=imagecreatefromgif($sFileSrc); $sFileDest.='.gif'; break; case 'image/jpeg': $img_src=imagecreatefromjpeg($sFileSrc); $sFileDest.='.jpg'; break; default: return false; break; } if (!$img_src) { return false; } $srcWidth = $aSize[0]; $srcHeight = $aSize[1]; if (($srcWidth/$srcHeight) < 1) { $ratio=$iWidthMax/$srcWidth; } else { $ratio=$iHeightMax/$srcHeight; } if ($ratio>1) { $ratio = 1; } if (($srcWidth * $ratio)>$iWidthMax) { $ratio = $iWidthMax/$srcWidth; } if (($srcHeight * $ratio)>$iHeightMax) { $ratio = $iHeightMax/$srcHeight; } $iWidthDest = $srcWidth * $ratio; $iHeightDest = $srcHeight * $ratio; if ($iWidthDest) { if (!$bForcedMinSize and ($iWidthDest>$aSize[0])) { $iWidthDest=$aSize[0]; } $iWidthNew=$iWidthDest; if ($iHeightDest) { $iHeightNew=$iHeightDest; } else { $iSizeRelation=$iWidthDest/$aSize[0]; $iHeightNew=round($iSizeRelation*$aSize[1]); } } else { $iWidthNew=$aSize[0]; $iHeightNew=$aSize[1]; } $sFileFullPath = Config::Get('path.root.server').'/'.$sDirDest.'/'.$sFileDest; @func_mkdir(Config::Get('path.root.server'), $sDirDest); if ($iWidthDest and $iWidthDest!=$aSize[0]) { $img_dest=imagecreatetruecolor($iWidthNew,$iHeightNew); imagesavealpha($img_dest,true); imagealphablending($img_dest,false); if (imagecopyresampled($img_dest,$img_src,0,0,0,0,$iWidthNew,$iHeightNew,$aSize[0],$aSize[1])) { imagedestroy($img_src); switch ($aSize['mime']) { case 'image/png': if (imagepng($img_dest,$sFileFullPath)) { chmod($sFileFullPath,0666); return $sFileDest; } break; case 'image/gif': if (imagegif($img_dest,$sFileFullPath)) { chmod($sFileFullPath,0666); return $sFileDest; } break; case 'image/jpeg': if (imagejpeg($img_dest,$sFileFullPath,$iQualityJPG)) { chmod($sFileFullPath,0666); return $sFileDest; } break; } } } else { if (copy($sFileSrc,$sFileFullPath)) { return $sFileDest; } } return false; }
if (imagejpeg($img_dest,$sFileFullPath,100)) { chmod($sFileFullPath,0666); return $sFileDest; }
int imagejpeg (resource image [, string filename [, int quality]])
/home/u22123/zem-kadastrru/www/templates/compiled/new/
Или я заблуждаюсь. Если нет, то что лучше и чем?
В цикле
Модифицированный запросе выглядит так
И в результате получаем список comment_id из обеих таблиц.
Синтаксис функции вот
Думаю тут дело в комментариях — это таблицы
prefix_comment,prefix_comment_online
на хренне нужноА то уж очень накладно информацию о каждом треке вручную вводить.