Exemple #1
0
 public function API_list()
 {
     iPHP::app('user.class', 'static');
     user::get_cookie() or iPHP::code(0, 'iCMS:!login', 0, 'json');
     iPHP::app('favorite.func');
     $array = favorite_list(array('userid' => user::$userid));
     iPHP::json($array);
 }
"></span>
          </li>	
          <li>
            Score: <span id="post-score-<?php 
echo $post->id;
?>
"><?php 
echo $post->score;
?>
</span>
            <?php 
echo vote_widget();
?>
          </li>
          <li>Favorited by: <span id="favorited-by"><?php 
echo favorite_list($post);
?>
</span></li>
        </ul>
      </div>

<?php 
do_content_for("post_cookie_javascripts");
?>
<script type="text/javascript">
  var widget = new VoteWidget($("stats"));
  widget.set_post_id(<?php 
echo $post->id;
?>
);
  widget.init_hotkeys();