Tuesday, December 30, 2014

Remove index.php from url YII

Standard
create .htaccess under www-->yiisitename  add following code on .htaccess Options +FollowSymLinks IndexIgnore */* RewriteEngine on # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # otherwise forward it to index.php RewriteRule...

Wednesday, December 17, 2014

Tuesday, December 16, 2014

create CSV report in DB data YII

Standard
hi guys this is my testing code about yii  CSV report i created data table name as deal  and i created Deal control & crud this is my data table CREATE TABLE IF NOT EXISTS `deals` ( `DealId` int(11) NOT NULL AUTO_INCREMENT, `DealName` varchar(255) NOT NULL, `Dealdescription`...

Monday, December 8, 2014

YII ACCESS RULES from data base

Standard
this is represent haw add user access for specific users in to page i have 2 table  1.user table 2.user level table user table CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(20) NOT NULL, `password` varchar(128) NOT NULL, `email`...

Friday, December 5, 2014

Yii User access rules

Standard
this for YII USER MODULE Load and store the user's data every time a page is requested. To do this, modify the Controller class as follows: i added this on  compound controller becouse  All controller classes for this application should extend from this base class. public...

Thursday, December 4, 2014

YII Send Email & get Template content from database Part -2

Standard
see part-1 i created template folder on view & create file name as user_registation.php sample email template by channa smcs add add this site controll In code comment u can get basic undestand about what i did public function actionEmail() { // echo ''.(print_r($_POST,1)).' '; ...

YII Send Email & get Template content from database Part -1

Standard
in priviouse blog  make send user email & admin email . in this blog i coding sent email using email template  & get email content from data base . 1.create email template table to insert email data CREATE TABLE IF NOT EXISTS `emailtemplate` ( `id` int(11) unsigned...

Monday, December 1, 2014

Thursday, November 27, 2014

Yii Gridview CButton style

Standard
This  code shows about how to add a custom button with your own icon for your CGridView of Yii framework.“view”, “update”, “delete” button and it have corresponding actions. We can change it using CButtonColumn properties. widget('zii.widgets.grid.CGridView', array( ...

Sharp AQUOS Android Smartphone

Standard
Sharp Corporation collaborated with frog's team of designers and technologists to create “Feel UX”, a new Android smartphone experience that is easy to use, highly personalized, and visually stunning. STUNNING 3D REALISM ON SCREENThe AQUOS Phone's parallax barrier system—which imitates...

Get Country of IP Address with PHP

Standard
I'm trying to put together a PHP script that I can query from any web browser and it returns the Country of the IP address that accessed the PHP script There are various web APIs that will do this for you. Here's an example using http://ipinfo.io: $ip = $_SERVER['REMOTE_ADDR']; $details...

Wednesday, November 26, 2014

create div stick to top when scrolled

Standard
There are times when you would want to display a DIV bar at the top of the page when your scrolls on the page top or down  and it should go back to its original position when the user scrolls back up. jQuery code: / executed when the viewr scrolls the page. $(window).scroll(function(e) { // Get the position of the location where the scroller starts. var scroller_anchor = $(".scroller_anchor").offset().top; ...

website's content on the Twitter wall Yii

Standard
Add buttons to your website to help your visitors share content and connect on Twitter.   a class="twitter-share-button" href="https://twitter.com/share" data-url="http://web/git/streamline/index.php/listings/ListingId; ?>" !--data-url="theme->baseUrl;?>/index.php/listings/ListingId;...

website's content on the faebook wall Yii

Standard
post my website's content on the faebook wall. who want to share it. <pre class="java" name="code"><div id="fb-root"> </div> <script>(function(d, s, id) {   var js, fjs = d.getElementsByTagName(s)[0];   if (d.getElementById(id)) return;   js = d.createElement(s);...

Sunday, November 16, 2014

Thursday, October 30, 2014

Friday, October 24, 2014

Thursday, October 23, 2014

Wednesday, October 22, 2014

Nearest-location finder radius for MySQL

Standard
CREATE TABLE IF NOT EXISTS `location` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `iso` varchar(50) DEFAULT NULL, `local_name` varchar(255) DEFAULT NULL, `type` char(2) DEFAULT NULL, `in_location` int(11) unsigned DEFAULT NULL, `geo_lat` double(18,11) DEFAULT NULL, `geo_lng`...