SELECT
SUBSTRING_INDEX(email, '@', 1) ,
SUBSTRING_INDEX(email, '@', -1)
FROM listings
Yii::app()->getBaseUrl(true); // => http://localhost/yii_projectsYii::app()->getHomeUrl(); // => /yii_projects/index.php
Yii::app()->getBaseUrl(false); // => /yii_projects
function make_thumb($src, $dest, $desired_width) { /* read the source image */ $source_image = imagecreatefromjpeg($src); $width = imagesx($source_image); $height = imagesy($source_image); /* find the "desired height" of this thumbnail, relative to the desired width */ $desired_height = floor($height * ($desired_width / $width)); /* create a new, "virtual" image */ $virtual_image = imagecreatetruecolor($desired_width, $desired_height); /* copy source image at a resized size */ imagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $desired_width, $desired_height, $width, $height); /* create the physical thumbnail image to its destination */ imagejpeg($virtual_image, $dest); }
core/template
: This block renders a template defined by its template
attribute. The majority of blocks defined in the layout are of type or subtype of core/template
.page/html
: This is a subtype of core/template
and defines the root block. All other blocks are child blocks of this block.page/html_head
: Defines the HTML head section of the page which contains elements for including JavaScript, CSS etc.page/html_header
: Defines the header part of the page which contains the site logo, top links, etc.page/template_links
: This block is used to create a list of links. Links visible in the footer and header area use this block type.core/text_list
: Some blocks like content
, left
, right
etc. are of type core/text_list
. When these blocks are rendered, all their child blocks are rendered automatically without the need to call thegetChildHtml()
method.page/html_wrapper
: This block is used to create a wrapper block which renders its child blocks inside an HTML tag set by the action setHtmlTagName
. The default tag is
if no element is set.page/html_breadcrumbs
: This block defines breadcrumbs on the page.page/html_footer
: Defines footer area of page which contains footer links, copyright message etc.core/messages
: This block renders error/success/notice messages.page/switch
: This block can be used for the language or store switcher.