Created
January 20, 2011 20:03
-
-
Save collegeman/788537 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function calcLevel($new_pts, $old_pts) { | |
$cur_pts = Member::getPoints($this->member_id, $old_pts); | |
if (!is_numeric($cur_pts)) { | |
$cur_pts = 0; | |
// sometimes we use $cur_pts = is_numeric($cur_pts) ? $cur_pts : 0; | |
} | |
if ($new_lev->level_id > $cur_lev) { | |
$this->new_lev = $new_lev->level_id; | |
$this->log("Found new level"); | |
return $new_lev->level_id; | |
} else if (1 == 2) { | |
// do something | |
} else { | |
// do something else | |
} | |
$this->new_lev = 0; | |
return 0; | |
} | |
?> | |
<form action="<?php echo linkTo('admin', 'events'); ?>" id="clear_form" method="post" onSubmit="clearEventForMember();return false"> | |
<input | |
type="text" | |
name="event_<?php echo DB_COL_USERNAME; ?>" | |
id="clear_<?php echo DB_COL_EVENT_NAME; ?>" | |
value="<?php echo escapeForDisplay($this->member->username); ?>" | |
/> | |
</form> | |
<?php foreach($list as $item) { ?> | |
<h1><?php echo $item->title ?></h1> | |
<div><?php echo $item->excerpt ?></div> | |
<?php if ($item->closed == 1) { ?> | |
<span>This item is closed.</span> | |
<?php } else { ?> | |
<span>This item is open!</span> | |
<?php } ?> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment