Пример #1
0
?>
</span>
                    <div class="clear"></div>
                </li>
                <li class="goblinpoint">
                    <span class="currency">Goblin point</span>
                    <span><?php 
echo $currency['wcoin_g'];
?>
</span>
                    <div class="clear"></div>
                </li>
                <li class="credits">
                    <span class="currency">Credits</span>
                    <span><?php 
echo MEMBCREDITS::getCCredits();
?>
</span>
                    <div class="clear"></div>
                </li>
            </ul>
        </div>
        <div id="pAjax">
            <img src="<?php 
echo $this->getTemplate('core');
?>
images/up_panel.gif" alt="ajax"/>
            <div class="upd-txt"><?php 
echo Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'Updating');
?>
</div>
Пример #2
0
 private static function voteCheck($id, $award)
 {
     $getMemb = MEMBCREDITS::model()->findAll(array('condition' => 'memb___id=:memb___id', 'params' => array('memb___id' => $id)));
     if ((int) $getMemb > 0) {
         $query = "UPDATE MEMB_CREDITS SET credits+=" . $award . " WHERE memb___id='{$id}'";
         $command = Yii::app()->db->createCommand($query);
         $command->execute();
     } else {
         $membcred = new MEMBCREDITS();
         $membcred->memb___id = $id;
         $membcred->credits = $award;
         $membcred->save();
     }
 }