コード例 #1
0
    $todisplay2 = 'false';
    $todisplay3 = 'false';
    if ($i < sizeof($designers)) {
        $todisplay1 = 'true';
        $imgpath1 = Profile::findBySql('select profile_picture from profile where user_name ="' . $designers[$i]->designer_user_name . '"')->one();
        $name1 = DesignerSocialLogin::findBySql('select designer_first_name, designer_last_name, designer_revenue from designer where designer_user_name ="' . $designers[$i]->designer_user_name . '"')->one();
    }
    if ($i + 1 < sizeof($designers)) {
        $todisplay2 = 'true';
        $imgpath2 = Profile::findBySql('select profile_picture from profile where user_name ="' . $designers[$i + 1]->designer_user_name . '"')->one();
        $name2 = DesignerSocialLogin::findBySql('select designer_first_name, designer_last_name, designer_revenue from designer where designer_user_name ="' . $designers[$i + 1]->designer_user_name . '"')->one();
    }
    if ($i + 2 < sizeof($designers)) {
        $todisplay3 = 'true';
        $imgpath3 = Profile::findBySql('select profile_picture from profile where user_name ="' . $designers[$i + 2]->designer_user_name . '"')->one();
        $name3 = DesignerSocialLogin::findBySql('select designer_first_name, designer_last_name, designer_revenue from designer where designer_user_name ="' . $designers[$i + 2]->designer_user_name . '"')->one();
    }
    ?>
			
			<div class="row row-list">
			<?php 
    if ($todisplay1 == 'true') {
        ?>
			<div class="col-xs-3">
			<?php 
        echo Html::img($imgpath1->profile_picture, ['width' => 100, 'height' => 100]);
        echo "<br/>";
        ?>
			<a href="index.php?r=site/viewprofile&username=<?php 
        echo $designers[$i]->designer_user_name;
        ?>
コード例 #2
0
 public function getDesignerInfo($username)
 {
     $name = DesignerSocialLogin::findBySql('select designer_first_name, designer_last_name from designer where designer_user_name ="' . $username . '"')->one();
     return $name;
 }